I ran the code below and got a crash. replicated twice
I think it is because the dataset in the model doesn't match the manifests list (salthouse vs demoOneFactor), but shouldn't crash....
I think it is because the dataset in the model doesn't match the manifests list (salthouse vs demoOneFactor), but shouldn't crash....
require(OpenMx)
salthouse <- read.table("http://www.subjectpool.com/data/2009/andrea/salthouse.txt", header=TRUE, sep="\t", as.is=c(TRUE))
manifests <- names(salthouse)
latents <- c("G")
factorModel <- mxModel("One Factor", type="RAM",
manifestVars = manifests,
latentVars = latents,
mxPath(from=latents, to=manifests),
mxPath(from=manifests, arrows=2),
mxPath(from=latents, arrows=2, free=F, values=1.0),
mxData(cov(demoOneFactor), type="cov", numObs=500)
)
mxRun(factorModel)
#1
Log in or register to post comments
#2
Log in or register to post comments