Thank you very much for your reply and your head's up Prof. Jorgensen. But there are questions:
1) You told me, that it is a problem to compare the coefficients across the two groups based on the
GLS-estimator. You refer to an article, but these article (I read the summary) refress only to nonlinear models like
probit or logit. Did you have in mind, that I work with a linear model, the so called linear probability model (LPM) with
an endogenous variable with two responses (I treat this dependent variable in the model as numeric). ??
Does this problem of comparing groups exist also with ML-estimators?
2) If you are right: What can you recommend? I think I can try to estimate the coefficients with the "ML"-estimator in combination with
bootstrap? What do you think about it? Are the coefficents comparable?
But the results are the same as with the GLM-Modell? Is this psssible or indicates that, thta the model is not identified?
3.) If I try the estimator "MLR" I get the following warning message:
Warning messages:
1: In lav_data_full(data = data, group = group, cluster = cluster, :
lavaan WARNING: some observed variances are (at least) a factor 1000 times larger than others; use varTable(fit) to investigate
2: In lav_model_vcov(lavmodel = lavmodel, lavsamplestats = lavsamplestats, :
lavaan WARNING:
The variance-covariance matrix of the estimated parameters (vcov)
does not appear to be positive definite! The smallest eigenvalue
(= 3.494757e-21) is close to zero. This may be a symptom that the
model is not identified.
In order to compare the printout of the two estimators "ML" and "GLM" - ceteris paribus - I append it above:
The syntax of the model:
m3<- "
Unsicherheit~ c(a,b)*essround_re + agea + Geschlecht + eduyrskor
FAC_angst ~ Geschlecht + agea + c(g,h) *essround_re
+ eduyrskor + c(k,l)*Unsicherheit
AFDID~ c(i,j)*FAC_angst + Geschlecht + agea +eduyrskor
+ c(e,f)*essround_re + c(c,d)*Unsicherheit
#Unsicherheit~~0*FAC_angst
#Unsicherheit~~0*AFDID
essround_re ~~0*agea
essround_re~~0*Geschlecht
essround_re~~0*eduyrskor
agea~~eduyrskor
IND:=a*c
DIR:=e
IN2:=g*i
IN2O:=h*j
IN3:=a*k*i
IN3O:=b*l*j
#TE:=IND + DIR
INDO:=b*d
DIRO:=f
"
I Estimation with GLM as estimator an bootstrapping: syntax and printout:
lavaan 0.6-9 ended normally after 169 iterations
Estimator GLS
Optimization method NLMINB
Number of model parameters 60
Number of observations per group: Used Total
0 1728 2952
1 774 1592
Model Test User Model:
Test statistic 44.070
Degrees of freedom 10
P-value (Chi-square) 0.000
Test statistic for each group:
Model Test Baseline Model:
Test statistic 759.434
Degrees of freedom 42
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.953
Tucker-Lewis Index (TLI) 0.801
Root Mean Square Error of Approximation:
RMSEA 0.052
90 Percent confidence interval - lower 0.037
90 Percent confidence interval - upper 0.068
P-value RMSEA <= 0.05 0.379
Standardized Root Mean Square Residual:
Parameter Estimates:
Standard errors Bootstrap
Number of requested bootstrap draws 1000
Number of successful bootstrap draws 1000
Group 1 [0]:
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv
Unsicherheit ~
essround_r (a) 0.020 0.017 1.168 0.243 0.020
agea 0.001 0.001 1.060 0.289 0.001
Geschlecht 0.177 0.018 9.863 0.000 0.177
eduyrskor -0.018 0.003 -6.920 0.000 -0.018
FAC_angst ~
Geschlecht -0.063 0.044 -1.440 0.150 -0.063
agea -0.001 0.001 -0.511 0.609 -0.001
essround_r (g) 0.065 0.041 1.566 0.117 0.065
eduyrskor -0.073 0.007 -10.213 0.000 -0.073
Unsicherht (k) 0.403 0.063 6.422 0.000 0.403
AFDID ~
FAC_angst (i) 0.046 0.007 6.235 0.000 0.046
Geschlecht -0.019 0.008 -2.276 0.023 -0.019
agea -0.000 0.000 -0.813 0.416 -0.000
eduyrskor 0.003 0.001 2.452 0.014 0.003
essround_r (e) 0.014 0.007 1.858 0.063 0.014
Unsicherht (c) 0.026 0.014 1.804 0.071 0.026
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv
essround_re ~~
agea 0.000 0.000
Geschlecht 0.000 0.000
eduyrskor 0.000 0.000
agea ~~
eduyrskor -14.203 1.235 -11.502 0.000 -14.203
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv
.Unsicherheit 0.318 0.057 5.624 0.000 0.318
.FAC_angst 0.760 0.155 4.897 0.000 0.760
.AFDID -0.001 0.029 -0.049 0.961 -0.001
essround_re 0.466 0.012 37.409 0.000 0.466
agea 53.793 0.411 130.902 0.000 53.793
Geschlecht 0.454 0.012 37.269 0.000 0.454
eduyrskor 14.696 0.076 193.234 0.000 14.696
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv
.Unsicherheit 0.127 0.005 25.323 0.000 0.127
.FAC_angst 0.755 0.026 28.530 0.000 0.755
.AFDID 0.025 0.003 7.608 0.000 0.025
essround_re 0.247 0.002 147.678 0.000 0.247
agea 283.224 8.081 35.048 0.000 283.224
Geschlecht 0.238 0.003 71.997 0.000 0.238
eduyrskor 9.789 0.281 34.862 0.000 9.789
R-Square:
Estimate
Unsicherheit 0.082
FAC_angst 0.101
AFDID 0.074
Group 2 [1]:
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv
Unsicherheit ~
essround_r (b) 0.086 0.030 2.875 0.004 0.086
agea 0.002 0.001 1.910 0.056 0.002
Geschlecht 0.216 0.030 7.308 0.000 0.216
eduyrskor -0.027 0.005 -5.294 0.000 -0.027
FAC_angst ~
Geschlecht -0.094 0.078 -1.200 0.230 -0.094
agea 0.002 0.002 0.907 0.364 0.002
essround_r (h) 0.059 0.075 0.783 0.434 0.059
eduyrskor -0.091 0.013 -7.094 0.000 -0.091
Unsicherht (l) 0.548 0.097 5.621 0.000 0.548
AFDID ~
FAC_angst (j) 0.102 0.012 8.730 0.000 0.102
Geschlecht -0.060 0.020 -3.021 0.003 -0.060
agea -0.003 0.001 -4.798 0.000 -0.003
eduyrskor -0.002 0.003 -0.612 0.541 -0.002
essround_r (f) 0.081 0.020 4.088 0.000 0.081
Unsicherht (d) 0.033 0.028 1.162 0.245 0.033
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv
essround_re ~~
agea 0.000 0.000
Geschlecht 0.000 0.000
eduyrskor 0.000 0.000
agea ~~
eduyrskor -7.859 1.695 -4.636 0.000 -7.859
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv
.Unsicherheit 0.397 0.101 3.918 0.000 0.397
.FAC_angst 1.129 0.270 4.186 0.000 1.129
.AFDID 0.299 0.076 3.924 0.000 0.299
essround_re 0.487 0.018 26.832 0.000 0.487
agea 55.377 0.578 95.756 0.000 55.377
Geschlecht 0.451 0.018 24.950 0.000 0.451
eduyrskor 14.685 0.103 142.943 0.000 14.685
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv
.Unsicherheit 0.165 0.008 21.847 0.000 0.165
.FAC_angst 1.094 0.053 20.585 0.000 1.094
.AFDID 0.076 0.006 12.640 0.000 0.076
essround_re 0.248 0.003 86.160 0.000 0.248
agea 269.061 11.339 23.728 0.000 269.061
Geschlecht 0.246 0.003 78.461 0.000 0.246
eduyrskor 8.348 0.375 22.261 0.000 8.348
R-Square:
Estimate
Unsicherheit 0.113
FAC_angst 0.122
AFDID 0.198
Defined Parameters:
Estimate Std.Err z-value P(>|z|) Std.lv
IND 0.001 0.001 0.832 0.405 0.001
DIR 0.014 0.007 1.858 0.063 0.014
IN2 0.003 0.002 1.486 0.137 0.003
IN2O 0.006 0.008 0.768 0.442 0.006
IN3 0.000 0.000 1.091 0.275 0.000
IN3O 0.005 0.002 2.357 0.018 0.005
INDO 0.003 0.003 0.923 0.356 0.003
DIRO 0.081 0.020 4.088 0.000 0.081
II. Estimation with ML and bootstrap:syntax and printout
> m0121.fit <- sem(m3, ess15se_dat,estimator="ML",
+ group="ostsoz", se="bootstrap"
+ )
Printout:
summary(m0121.fit, standardized = TRUE, fit.measures = TRUE,
+ rsquare=TRUE)
lavaan 0.6-9 ended normally after 167 iterations
Estimator ML
Optimization method NLMINB
Number of model parameters 60
Number of observations per group: Used Total
0 1728 2952
1 774 1592
Model Test User Model:
Test statistic 45.730
Degrees of freedom 10
P-value (Chi-square) 0.000
Test statistic for each group:
0 40.433
1 5.297
Model Test Baseline Model:
Test statistic 1065.891
Degrees of freedom 42
P-value 0.000
User Model versus Baseline Model:
Comparative Fit Index (CFI) 0.965
Tucker-Lewis Index (TLI) 0.853
Loglikelihood and Information Criteria:
Loglikelihood user model (H0) -24296.440
Loglikelihood unrestricted model (H1) -24273.575
Akaike (AIC) 48712.879
Bayesian (BIC) 49062.370
Sample-size adjusted Bayesian (BIC) 48871.735
Root Mean Square Error of Approximation:
RMSEA 0.053
90 Percent confidence interval - lower 0.038
90 Percent confidence interval - upper 0.070
P-value RMSEA <= 0.05 0.331
Standardized Root Mean Square Residual:
Parameter Estimates:
Standard errors Bootstrap
Number of requested bootstrap draws 1000
Number of successful bootstrap draws 1000
Group 1 [0]:
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Unsicherheit ~
essround_r (a) 0.020 0.017 1.153 0.249 0.020 0.027
agea 0.001 0.001 1.104 0.270 0.001 0.027
Geschlecht 0.177 0.018 9.936 0.000 0.177 0.237
eduyrskor -0.018 0.003 -7.219 0.000 -0.018 -0.159
FAC_angst ~
Geschlecht -0.063 0.043 -1.467 0.142 -0.063 -0.034
agea -0.001 0.001 -0.529 0.597 -0.001 -0.012
essround_r (g) 0.065 0.042 1.546 0.122 0.065 0.035
eduyrskor -0.073 0.007 -9.855 0.000 -0.073 -0.256
Unsicherht (k) 0.403 0.064 6.285 0.000 0.403 0.164
AFDID ~
FAC_angst (i) 0.046 0.007 6.177 0.000 0.046 0.259
Geschlecht -0.019 0.009 -2.219 0.026 -0.019 -0.057
agea -0.000 0.000 -0.743 0.457 -0.000 -0.020
eduyrskor 0.003 0.001 2.344 0.019 0.003 0.067
essround_r (e) 0.014 0.007 1.910 0.056 0.014 0.042
Unsicherht (c) 0.026 0.014 1.837 0.066 0.026 0.059
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
essround_re ~~
agea 0.000 0.000 0.000
Geschlecht 0.000 0.000 0.000
eduyrskor 0.000 0.000 0.000
agea ~~
eduyrskor -14.785 1.285 -11.507 0.000 -14.785 -0.274
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Unsicherheit 0.318 0.053 6.004 0.000 0.318 0.854
.FAC_angst 0.760 0.156 4.885 0.000 0.760 0.828
.AFDID -0.001 0.030 -0.046 0.963 -0.001 -0.009
essround_re 0.466 0.012 39.506 0.000 0.466 0.935
agea 53.793 0.401 134.275 0.000 53.793 3.192
Geschlecht 0.454 0.012 37.494 0.000 0.454 0.912
eduyrskor 14.696 0.077 191.441 0.000 14.696 4.593
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Unsicherheit 0.127 0.005 25.397 0.000 0.127 0.915
.FAC_angst 0.754 0.026 28.547 0.000 0.754 0.895
.AFDID 0.025 0.003 7.755 0.000 0.025 0.926
essround_re 0.249 0.001 306.949 0.000 0.249 1.000
agea 284.020 7.496 37.889 0.000 284.020 1.000
Geschlecht 0.248 0.001 219.442 0.000 0.248 1.000
eduyrskor 10.237 0.279 36.667 0.000 10.237 1.000
R-Square:
Estimate
Unsicherheit 0.085
FAC_angst 0.105
AFDID 0.074
Group 2 [1]:
Regressions:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
Unsicherheit ~
essround_r (b) 0.086 0.028 3.025 0.002 0.086 0.100
agea 0.002 0.001 1.984 0.047 0.002 0.069
Geschlecht 0.216 0.031 6.899 0.000 0.216 0.249
eduyrskor -0.027 0.005 -5.280 0.000 -0.027 -0.180
FAC_angst ~
Geschlecht -0.094 0.074 -1.261 0.207 -0.094 -0.042
agea 0.002 0.002 0.898 0.369 0.002 0.032
essround_r (h) 0.059 0.072 0.818 0.413 0.059 0.026
eduyrskor -0.091 0.013 -6.817 0.000 -0.091 -0.235
Unsicherht (l) 0.548 0.095 5.747 0.000 0.548 0.211
AFDID ~
FAC_angst (j) 0.102 0.012 8.414 0.000 0.102 0.369
Geschlecht -0.060 0.020 -2.974 0.003 -0.060 -0.097
agea -0.003 0.001 -4.956 0.000 -0.003 -0.179
eduyrskor -0.002 0.003 -0.623 0.533 -0.002 -0.019
essround_r (f) 0.081 0.018 4.391 0.000 0.081 0.131
Unsicherht (d) 0.033 0.027 1.219 0.223 0.033 0.046
Covariances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
essround_re ~~
agea 0.000 0.000 0.000
Geschlecht 0.000 0.000 0.000
eduyrskor 0.000 0.000 0.000
agea ~~
eduyrskor -7.829 1.806 -4.335 0.000 -7.829 -0.165
Intercepts:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Unsicherheit 0.397 0.098 4.052 0.000 0.397 0.923
.FAC_angst 1.129 0.278 4.066 0.000 1.129 1.012
.AFDID 0.299 0.074 4.036 0.000 0.299 0.969
essround_re 0.487 0.018 26.412 0.000 0.487 0.974
agea 55.377 0.598 92.607 0.000 55.377 3.375
Geschlecht 0.451 0.018 24.759 0.000 0.451 0.906
eduyrskor 14.685 0.100 146.159 0.000 14.685 5.068
Variances:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
.Unsicherheit 0.164 0.008 21.819 0.000 0.164 0.887
.FAC_angst 1.093 0.052 20.833 0.000 1.093 0.877
.AFDID 0.076 0.006 12.407 0.000 0.076 0.801
essround_re 0.250 0.001 374.314 0.000 0.250 1.000
agea 269.243 10.709 25.141 0.000 269.243 1.000
Geschlecht 0.248 0.002 136.849 0.000 0.248 1.000
eduyrskor 8.394 0.368 22.818 0.000 8.394 1.000
R-Square:
Estimate
Unsicherheit 0.113
FAC_angst 0.123
AFDID 0.199
Defined Parameters:
Estimate Std.Err z-value P(>|z|) Std.lv Std.all
IND 0.001 0.001 0.844 0.399 0.001 0.002
DIR 0.014 0.007 1.909 0.056 0.014 0.042
IN2 0.003 0.002 1.471 0.141 0.003 0.009
IN2O 0.006 0.008 0.792 0.429 0.006 0.010
IN3 0.000 0.000 1.054 0.292 0.000 0.001
IN3O 0.005 0.002 2.369 0.018 0.005 0.008
INDO 0.003 0.003 1.026 0.305 0.003 0.005
DIRO 0.
Thank you Prof. Jorgensen.