Hi everyone,
I hope you are doing well,
I'm taking my first steps in R and the Lavaan Package, and I'm trying to investigate the factorial structure of a measure related to dating victimization. The sample consists of 957 participants without missing values. The response options use a 5-point Likert scale. Both univariate and multivariate normalities are violated.
Here is the model, along with the outputs and warning messages.
Model.
Four first-order factor structure
model <- '
f1 =~ TV1 + TV2 + TV3 + TV4 + TV5 + TV6 + TV7 + TV8 + TV9 + TV10
f2 =~ TV11 + TV12 + TV13 + TV14 + TV15 + TV16 + TV17
f3 =~ TV18 + TV19 + TV20 + TV21 + TV22+ TV23 + TV24 + TV25
f4 =~ TV26 + TV27 + TV28 + TV29+ TV30'
fit.model <- cfa(model, data = TARV, ordered = TRUE, estimator = "DWLS", se = "robust", test = "scaled.shifted", std.lv = TRUE)
summary(fit.model, std = TRUE, fit.measures = TRUE)
Output:
lavaan 0.6.16 ended normally after 34 iterations
Estimator DWLS
Optimization method NLMINB
Number of model parameters 185
Number of observations 957
Model Test User Model:
Standard Scaled
Test Statistic 381.267 617.183
Degrees of freedom 399 399
P-value (Chi-square) 0.730 0.000
Scaling correction factor 1.083
Shift parameter 265.087
simple second-order correction
Model Test Baseline Model:
Test statistic 142505.191 17287.640
Degrees of freedom 435 435
P-value 0.000 0.000
Scaling correction factor 8.430
User Model versus Baseline Model:
Comparative Fit Index (CFI) 1.000 0.987
Tucker-Lewis Index (TLI) 1.000 0.986
Robust Comparative Fit Index (CFI) NA
Robust Tucker-Lewis Index (TLI) NA
Root Mean Square Error of Approximation:
RMSEA 0.000 0.024
90 Percent confidence interval - lower 0.000 0.020
90 Percent confidence interval - upper 0.009 0.028
P-value H_0: RMSEA <= 0.050 1.000 1.000
P-value H_0: RMSEA >= 0.080 0.000 0.000
Robust RMSEA NA
90 Percent confidence interval - lower NA
90 Percent confidence interval - upper NA
P-value H_0: Robust RMSEA <= 0.050 NA
P-value H_0: Robust RMSEA >= 0.080 NA
Standardized Root Mean Square Residual:
SRMR 0.041 0.041
I am getting this warning message:
Warning message:
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
(= -5.592776e-16) is smaller than zero. This may be a symptom that
the model is not identified.
I did run these functions, and I am getting these outputs:
> lavInspect(fit.model, "cov.lv")
f1 f2 f3 f4
f1 1.000
f2 0.854 1.000
f3 0.922 0.816 1.000
f4 0.903 0.873 0.937 1.000
> det(lavInspect(fit.model, "cov.lv"))
[1] 0.003425802
> eigen(lavInspect(fit.model, "cov.lv"))
eigen() decomposition
$values
[1] 3.6536666 0.1999477 0.0990346 0.0473511
$vectors
[,1] [,2] [,3] [,4]
[1,] -0.5036916 0.1988844 0.7828187299 0.3064875
[2,] -0.4841475 -0.8386756 -0.0007780208 -0.2494471
[3,] -0.5033330 0.4944816 -0.1812847326 -0.6850399
[4,] -0.5084800 0.1120542 -0.5952563117 0.6120146
What can I do to find out the origin of these messages and solve the problem?
Are the DWLS, robust and scaled.shifted correct for the scale type and sample size? Or should I change for MLM, robust and satorra.bentler?
Does the chi-square statistic and is p-value compromise the model?
I'm sorry if these seem like really basic questions.
Thank you,
Maria
The sample consists of 957 participants without missing values.
The response options use a 5-point Likert scale.
Both univariate and multivariate normalities are violated.
I am getting this warning message:
The variance-covariance matrix of the estimated parameters (vcov)
does not appear to be positive definite!
I did run these functions
should I change for MLM, robust and satorra.bentler?
Does the chi-square statistic and is p-value compromise the model?