General SEM Discussions

Posted on
No user picture. jasperrr Joined: 04/21/2015

How can I use SEM to predict variable scores

Hi all, I have built a SEM model as attached image. There are five variables, and one modulation factor.

If I know four of the five variables, can I use the model to predict the 5th variable? How can I do this?

Posted on
No user picture. Idunnu Joined: 03/11/2015

Problems with model fit

This is what i wrote for my model specification but I'm getting this error
2: In eval(expr, envir, enclos) :
Could not compute QR decomposition of Hessian.
Optimization probably did not converge.

> model.dhp <- specifyModel ()
1: EA_response -> EA_survival,NA,1
2: EA_response -> EA_progeny,gam12
3: EA_response -> EA_progeny_wet_mass,gam13
4: EA_response -> EA_progeny_dry_mass,gam14
5: FC_response -> FC_survival,NA,1
6: FC_response -> FC_progeny,gam22
7: BA_response -> Ba_emergence,NA,1
8: BA_response -> Ba_shoot_length,gam32
9: BA_response -> Ba_root_length,gam33

Posted on
No user picture. arjenc Joined: 02/17/2015

Factor analysis with weights

I have a question. I looked at the package sem and lavaan.survey for the factor analysis but sem doesn't support weights and lavaan.survey doesn't have FIML. Without FIML, lavaan.survey was still able to do the job of getting the expected graphs (smooth curves) but with OpenMx, it does not work. I get straight lines.

The code is below and the data set is in the attachment. I don't know if the weights are calculated with the data in the analysis.

dsetA <- read.table("dsetA.txt",sep="")
# Possible values of the weighting variable
valm <- seq(21,40,by=1/10)

Posted on
No user picture. CharlesD Joined: 04/30/2013

random variance parameters, or approximations of such?

Hi all. So I'm taking a look at a dataset of about 200 individuals, each with a number of variables measured 50 times longitudinally. A lot of these variables are scored on a scale of 0-100, which 'seems' to have created large differences in scale usage - differences that are no doubt normally there with a 0-10 scale but are probably emphasised now. If the measurement model were equivalent across individuals, then the structural model is clearly not anyway, so I have a similar issue, or probably both measurement and structural differences.
Posted on
No user picture. fife Joined: 07/01/2010

"Observed" correlation matrix with missing data--is it computed?

I've got a bit of an unusual question. I have missing data and I'm taking advantage of FIML's algorithms to handle that missingness. I know the EM algorithm will return a "corrected" correlation or covariance matrix. Will FIML do the same? I know it returns corrected model estimates, but I can't see how I'd extract the corrected correlation matrix. When I type:

model$data

It returns the raw dataset (with missing values still missing).

Any ideas?

Posted on
No user picture. fife Joined: 07/01/2010

AIC/BIC is NA, but other FIs are computed

Hi all,

I've run a model and am a bit puzzled that it won't give me the information criteria (AIC and BIC). Everything else is computed, including chi, k, and df, which are the sufficient statistics. Am I missing something? I've included a screenshot. It seems the AIC should be

1557.625 + ncol(d)*(ncol(d)-1)-2*453 = 1707.625,
where ncol(d) = 33

Posted on
No user picture. metavid Joined: 06/23/2014
Posted on
No user picture. moman822 Joined: 07/24/2014

Latent Variable Indicators

Can an indicator for a latent variable be used elsewhere in the structural part of a structural equations model as an independent variable? I think the answer is no, as I've not seen it done, but would like to check.

Thanks for any help

Posted on
No user picture. metavid Joined: 06/23/2014
Posted on
No user picture. fife Joined: 07/01/2010

Automatically computing residual variances for a specified RAM matrix

It seems I'm frequently wanting to compute an implied correlation matrix given a SE model. I began writing a function to do just that:

#### create a RAM model for testing
RAM = data.frame(matrix(c(
"F1", "A1", 1, .4,
"F1", "A2", 1, .4,
"F1", "A3", 1, .4,
"F2", "A4", 1, .4,
"F2", "A5", 1, .4,
"F2", "A6", 1, .4,
"F3", "A7", 1, .4,
"F3", "A8", 1, .4,
"F3", "A9", 1, .4,
"A10", "A9", 2, .5), ncol=4, byrow=T
))
names(RAM) = c("From", "To", "Arrows", "Values")

####
observed = c("A1", "A2", "A3", "A4", "A5", "A6", "A7", "A8", "A9", "A10")