Warning: covariance matrices are neither block diagonal nor unrestricted- opaque priors

24 views
Skip to first unread message

Johnathan Katsantonis

unread,
Feb 1, 2024, 7:45:30 AMFeb 1
to blavaan
Hello blavaan community,

I have fitted a complicated longitudinal model with four timepoints. The model is identified (cannot be properly estimated in regular maximum likelihood SEM and requires regularisation) and I do not get any error messages. However, a warning message occurs about the covariance matrices being neither block diagonal nor unrestricted. I read through this list and I found some responses saying that this is not a problem and I can report the findings. So, I am wondering if it is okay to ignore this warning and report my findings as normal?

Looking forward to hearing from you.

Kind regards,
Johnathan

CODE:
bmodel<-'
TEM=~1*EM1_S+ 1*EM2_S+1*EM3_S+1*EM4_S
TCLOS=~1*PCGCLOSE1_S+1*PCGCLOSE2_S+1*PCGCLOSE3_S+1*PCGCLOSE4_S

###STABLE TRAIT CORRELATION###
TEM~~TCLOS

TEM~~TEM
TCLOS~~TCLOS

###ESTIMATE RESIDUAL ERRORS/ STATE VARIABLES
EM1_S~~EM1_S
EM2_S~~EM2_S
EM3_S~~EM3_S
EM4_S~~EM4_S
PCGCLOSE1_S~~PCGCLOSE1_S
PCGCLOSE2_S~~PCGCLOSE2_S
PCGCLOSE3_S~~PCGCLOSE3_S
PCGCLOSE4_S~~PCGCLOSE4_S

###ESTIMATE STATE COVARIANCES
EM1_S~~cov3*PCGCLOSE1_S
EM2_S~~cov3*PCGCLOSE2_S
EM3_S~~cov3*PCGCLOSE3_S
EM4_S~~cov3*PCGCLOSE4_S

##CREATE INNOVATIONS/ AUTOREGRESSIVE TRAITS
OEM1=~1*EM1_S
OEM2=~1*EM2_S
OEM3=~1*EM3_S
OEM4=~1*EM4_S
OCL1=~1*PCGCLOSE1_S
OCL2=~1*PCGCLOSE2_S
OCL3=~1*PCGCLOSE3_S
OCL4=~1*PCGCLOSE4_S

OEM1~~cov1*OCL1
OEM2~~cov2*OCL2
OEM3~~cov2*OCL3
OEM4~~cov2*OCL4

OEM2~a1*OEM1
OEM3~a1*OEM2
OEM4~a1*OEM3

OCL2~a2*OCL1
OCL3~a2*OCL2
OCL4~a2*OCL3

OCL1~~v1*OCL1
OCL2~~u1*OCL2
OCL3~~u1*OCL3
OCL4~~u1*OCL4

OEM1~~v2*OEM1
OEM2~~u2*OEM2
OEM3~~u2*OEM3
OEM4~~u2*OEM4

###ESTIMATE CROSS-LAGGED PATHS
OCL2~OEM1
OCL3~OEM2
OCL4~OEM3
OEM2~OCL1
OEM3~OCL2
OEM4~OCL3 '

mydp<-dpriors(theta="gamma(.5, .165)[prec]",psi="gamma(.5, .165)[prec]", beta="normal(0,1)")
bstarts4<-blavaan(model=bmodel, data=gui,dp=mydp,  n.chains=3,burnin = 1000, sample=1000, bcontrol = list(cores=3), orthogonal=T,  int.ov.free=T, meanstructure=T)


Ed Merkle

unread,
Feb 1, 2024, 2:49:23 PMFeb 1
to Johnathan Katsantonis, blavaan
Johnathan,

This should be ok for most things you would want to do. Basically, you have freed some covariances but not all. This leads to a model covariance matrix with some 0 entries in it, which complicates prior distributions. blavaan puts a separate beta prior on each free correlation underlying the covariances, but these priors are also constrained by the fact that the full covariance matrix needs to be positive definite. So you end up with priors that are more informative than what you started with (more informative than what you originally declared). This is mostly a problem if you are computing metrics that explicitly evaluate the priors, like a Bayes factor or certain prior predictive checks. If you are only dealing with summaries of the posterior distribution, it should not be problematic.

Some further detail is in the "positive definite constraints" section here:


Ed
--
You received this message because you are subscribed to the Google Groups "blavaan" group.
To unsubscribe from this group and stop receiving emails from it, send an email to blavaan+u...@googlegroups.com.

Reply all
Reply to author
Forward
0 new messages