Skip to main content
Bumped by Community user
formatting
Source Link
Mark White
  • 10.7k
  • 4
  • 34
  • 75

I need to determine both the

  • number of free parameters to estimate and

  • degrees of freedom

of a structural equation model. I know how to calculate these values by hand. However, when iI use the R package lavaanlavaan, iI get a different number. I calculate 59 parameters to estimate.

> library(lavaan)
>modelo1 modelo1='<- '
+    ST ~ A*PA + B*MT+C*INF
+    
    PA=~CP127_1+CP127_2+CP127_3+CP127_4+CP127_5+CP127_6
+    MT=~CP128_1+CP128_2+CP128_3+CP128_4+CP128_5+CP128_6
+    INF=~CP138_1+CP138_2+CP138_3+CP138_4+CP138_5+CP138_6+CP138_7+CP138_8
+    ST=~CP139_1+CP139_2+CP139_3+CP139_4+CP139_5+CP139_6'
>  
ajuste1 =<- sem(modelo1,data=dataof,ordered =TRUE)
> summary(fit.measures=TRUE,ajuste1)
 

lavaan (0.5-23.1097) converged normally after  65 iterations

Number of observations                           416

Estimator                                       DWLS      Robust
Minimum Function Test Statistic              375.660     555.434
Degrees of freedom                               293         293
P-value (Chi-square)                           0.001       0.000
Scaling correction factor                                  0.977
Shift parameter                                          170.951
for simple second-order correction (Mplus variant)

I need to determine both the

  • number of free parameters to estimate and

  • degrees of freedom

of a structural equation model. I know how to calculate these values by hand. However, when i use the R package lavaan, i get a different number. I calculate 59 parameters to estimate.

> library(lavaan)
> modelo1='
+ ST ~ A*PA + B*MT+C*INF
+ PA=~CP127_1+CP127_2+CP127_3+CP127_4+CP127_5+CP127_6
+ MT=~CP128_1+CP128_2+CP128_3+CP128_4+CP128_5+CP128_6
+ INF=~CP138_1+CP138_2+CP138_3+CP138_4+CP138_5+CP138_6+CP138_7+CP138_8
+ ST=~CP139_1+CP139_2+CP139_3+CP139_4+CP139_5+CP139_6'
> ajuste1 = sem(modelo1,data=dataof,ordered =TRUE)
> summary(fit.measures=TRUE,ajuste1)
lavaan (0.5-23.1097) converged normally after  65 iterations

Number of observations                           416

Estimator                                       DWLS      Robust
Minimum Function Test Statistic              375.660     555.434
Degrees of freedom                               293         293
P-value (Chi-square)                           0.001       0.000
Scaling correction factor                                  0.977
Shift parameter                                          170.951
for simple second-order correction (Mplus variant)

I need to determine both the

  • number of free parameters to estimate and

  • degrees of freedom

of a structural equation model. I know how to calculate these values by hand. However, when I use the R package lavaan, I get a different number. I calculate 59 parameters to estimate.

library(lavaan)
modelo1 <- '
    ST ~ A*PA + B*MT+C*INF
    
    PA=~CP127_1+CP127_2+CP127_3+CP127_4+CP127_5+CP127_6
    MT=~CP128_1+CP128_2+CP128_3+CP128_4+CP128_5+CP128_6
    INF=~CP138_1+CP138_2+CP138_3+CP138_4+CP138_5+CP138_6+CP138_7+CP138_8
    ST=~CP139_1+CP139_2+CP139_3+CP139_4+CP139_5+CP139_6'
 
ajuste1 <- sem(modelo1,data=dataof,ordered =TRUE)
summary(fit.measures=TRUE,ajuste1)
 

lavaan (0.5-23.1097) converged normally after  65 iterations

Number of observations                           416

Estimator                                       DWLS      Robust
Minimum Function Test Statistic              375.660     555.434
Degrees of freedom                               293         293
P-value (Chi-square)                           0.001       0.000
Scaling correction factor                                  0.977
Shift parameter                                          170.951
for simple second-order correction (Mplus variant)
Source Link
leo
  • 21
  • 1
  • 2

Determine the degrees of freedom as well as the free parameters in an SEM

I need to determine both the

  • number of free parameters to estimate and

  • degrees of freedom

of a structural equation model. I know how to calculate these values by hand. However, when i use the R package lavaan, i get a different number. I calculate 59 parameters to estimate.

> library(lavaan)
> modelo1='
+ ST ~ A*PA + B*MT+C*INF
+ PA=~CP127_1+CP127_2+CP127_3+CP127_4+CP127_5+CP127_6
+ MT=~CP128_1+CP128_2+CP128_3+CP128_4+CP128_5+CP128_6
+ INF=~CP138_1+CP138_2+CP138_3+CP138_4+CP138_5+CP138_6+CP138_7+CP138_8
+ ST=~CP139_1+CP139_2+CP139_3+CP139_4+CP139_5+CP139_6'
> ajuste1 = sem(modelo1,data=dataof,ordered =TRUE)
> summary(fit.measures=TRUE,ajuste1)
lavaan (0.5-23.1097) converged normally after  65 iterations

Number of observations                           416

Estimator                                       DWLS      Robust
Minimum Function Test Statistic              375.660     555.434
Degrees of freedom                               293         293
P-value (Chi-square)                           0.001       0.000
Scaling correction factor                                  0.977
Shift parameter                                          170.951
for simple second-order correction (Mplus variant)