Hi Ed,
Thank you very much for the response. I have a hard time keeping track of which covariance the syntax is referring to. Regarding "You can check empirically that the correlations are 0 in your data," is this what you suggest?
> resid(FIT01, type = "cor") # same as cor.bollen
$type
[1] "cor.bollen"
$cov
C.1 C.2 C.3 C.4 NE.EV.2 NE.EV.3 NE.D.2 NE.D.4 NE.A.2 NE.A.3 OC.2 OC.3 OC.4 k1 k2 k3 k4
C.1 0.000
C.2 0.034 0.000
C.3 0.010 0.043 0.000
C.4 -0.012 -0.065 -0.054 0.000
NE.EV.2 -0.152 -0.176 -0.136 -0.049 0.000
NE.EV.3R 0.049 0.088 -0.029 0.059 0.070 0.000
NE.D.2 -0.069 -0.052 -0.141 0.034 -0.049 0.030 0.000
NE.D.4R -0.054 -0.001 -0.066 0.025 -0.003 0.192 0.078 0.000
NE.A.2 0.090 0.166 0.033 0.213 -0.171 0.035 -0.032 0.043 0.000
NE.A.3R 0.030 0.032 0.035 0.101 0.015 0.149 -0.088 0.014 -0.083 0.000
OC.2 0.006 0.046 -0.063 -0.026 -0.066 -0.076 -0.044 -0.155 0.097 -0.098 0.000
OC.3 -0.001 0.056 -0.035 -0.010 0.012 0.066 0.003 -0.033 0.123 -0.056 -0.002 0.000
OC.4 0.019 0.037 -0.027 -0.052 -0.056 0.024 -0.018 -0.061 0.145 -0.061 0.001 0.000 0.000
k1 -0.181 0.041 -0.245 -0.129 -0.132 0.074 0.353 0.098 0.097 -0.016 -0.065 -0.001 -0.055 0.000
k2 0.131 -0.097 -0.041 0.018 0.326 0.041 -0.136 -0.063 -0.089 -0.056 -0.004 0.078 0.046 -0.051 0.000
k3 0.051 0.095 0.224 0.076 -0.297 -0.091 -0.260 -0.123 0.347 -0.134 -0.010 0.044 0.058 -0.049 0.015 0.000
k4 -0.035 -0.057 -0.076 0.295 -0.161 0.031 -0.131 -0.062 -0.001 0.295 -0.074 -0.013 -0.063 0.008 0.031 0.037 0.000
$mean
C.1 C.2 C.3 C.4 NE.EV.2 NE.EV.3R NE.D.2 NE.D.4R NE.A.2 NE.A.3R OC.2 OC.3 OC.4 k1 k2 k3 k4
0.000 0.000 0.000 0.000 0.003 -0.006 0.003 -0.001 0.000 0.002 0.000 0.000 0.000 0.001 -0.006 -0.002 0.013
I don't see covariances that are 0. Some of the mean values are also not 0. Is this normal?
Here is the updated code (that still results in the "not positive definite" message):
DMC <- indProd(MYDATA,
var1 = c("C.2", "C.1", "C.3", "C.4"),
var2 = c("NE.D.2", "NE.EV.2", "NE.A.2", "NE.A.3R"),
match = TRUE, meanC = FALSE, residualC = FALSE, doubleMC = TRUE,
namesProd = c("k1", "k2", "k3", "k4"))
MYFMODEL <- '
## Factor loadings
f.C =~ C.1 + C.2 + C.3 + C.4
f.N =~ NE.EV.2 + NE.EV.3R + NE.D.2 + NE.D.4R + NE.A.2 + NE.A.3R
f.OC =~ OC.2 + OC.3 + OC.4
# Interaction term
f.C_f.N =~ k1 + k2 + k3 + k4
## Estimate covariances between interaction and predictors https://osf.io/y39z6
f.C ~~ f.C_f.N
f.N ~~ f.C_f.N
## Regression model with 3 predictors
f.OC ~ co*f.C + no*f.N + b3*f.C_f.N
Thanks again!