You are here

A little confused about estimations for a model with definition variables

3 posts / 0 new
Last post
Veronica_echo's picture
Joined: 02/23/2018 - 01:57
A little confused about estimations for a model with definition variables

Hi everyone,

I am trying to fit an LGC model with individually-varying time points. I've added definition variables as labels, and the model itself works well (the script is pasted below). I am just a little confused about the estimations. As my understanding, in my case, I should have full information maximum likelihood (FIML) rather than ML since individual contributions to the likelihood depends on the individual-specific time; but I am not sure if I can get the FIML through my codes. Do I have to use mxFitFunctionML() or some other statement? Thank you in advance.

lg.math.age.omx <- mxModel('LGC with individually varying time points',
                           type='RAM', mxData(observed = data, type='raw'),
                           # residual variance paths
                                  arrows=2, free=TRUE, values=40, labels='th'),
                           # latent variable variances and covariance
                           mxPath(from=c('eta1','eta2'), arrows=2, connect='unique.pairs',
                                  free=TRUE, values=c(1,0,1),
                           # regression weights
                           mxPath(from='eta1', to=c('y1','y2','y3','y4'),
                                  arrows=1, free=FALSE, values=1),
                           mxPath(from='eta2', to=c('y1','y2','y3','y4'), arrows=1, free=FALSE,
                           # means and intercepts
                           mxPath(from='one', to=c('eta1','eta2'),
                                  arrows=1, free=TRUE, values=c(40, 4), labels=c('alpha1','alpha2'))
) # close model
lg.math.age. t <- mxRun(lg.math.age.omx)
summary(lg.math.age. t)
AdminRobK's picture
Joined: 01/24/2014 - 12:15
Looks OK

I am pretty sure that the default behavior for MxModels with type="RAM" is to use mxFitFunctionML(). mxFitFunctionML() does FIML estimation automatically when used with RAM expectation and raw data, as is the case in your script. To make sure, you could check lg.math.age.t$fitfunction to see what class the fitfunction says it is.

Veronica_echo's picture
Joined: 02/23/2018 - 01:57

Thanks for your confirmation!