Hi all,
I'm trying to run a longitudinal model on a Likert scale (options 1-7) with two time points (N1=391 and N2=303), and when I ran these:
itemloadings <- rep(1:10, times = 2)
long.model <- '
Time1 = 1-10
Time2 = 11-20
COV = Time1*Time2
MEAN = Time2
CONSTRAIN = (1,11,a1,a2), (2,12,a1,a2), (3,13,a1,a2), (4,14,a1,a2), (5,15,a1,a2),
(6,16,a1,a2), (7,17,a1,a2), (8,18,a1,a2), (9,19,a1,a2), (10,20,a1,a2), # time-slope
(1,11,a3), (2,12,a4), (3,13,a5), (4,14,a6), (5,15,a7),
(6,16,a8), (7,17,a9), (8,18,a10), (9,19,a11), (10,20,a12), # item-time slope
(1,11,d1), (2,12,d1), (3,13,d1), (4,14,d1), (5,15,d1),
(6,16,d1), (7,17,d1), (8,18,d1), (9,19,d1), (10,20,d1), # item-time intercept 1
(1,11,d2), (2,12,d2), (3,13,d2), (4,14,d2), (5,15,d2),
(6,16,d2), (7,17,d2), (8,18,d2), (9,19,d2), (10,20,d2) # item-time intercept 2
'
mod <- bfactor(data.lirt, itemloadings, long.model, quadpts=9, TOL=1e-3, optimizer='nlminb')
I got this...
Iteration: 7, Log-Lik: -10847.615, Max-Change: 0.17865
Error: sigma matrix contains negative eigenvalues
In addition: Warning message:
Latent trait variance-covariance matrix became non-positive definite.
I'm not sure the npd is caused by the fact I have (relatively) small sample with a sizeable portion of missing data in the second wave, or simply because the model is not identified?
Does anyone have suggestions how I should salvage this?
I appreciate all the help and many thanks in advance!
Best regards
Amelia