Groups analysis

Posted on
No user picture. metavid Joined: 06/23/2014
Replied on Wed, 06/25/2014 - 15:03
Picture of user. mhunter Joined: 07/31/2009

This is a nice question! I've done multigroup analyses with 800 groups. There is no fixed limit on the number of groups. At some point you will start to fill up R's protection pointer stack. We catch this in OpenMx, and tell you to let us know about it on the these forums if it happens.
Replied on Thu, 06/26/2014 - 20:43
No user picture. metavid Joined: 06/23/2014

Hi,

If I understood it correctly, I could just specify e.g. 100 groups in R, (perhaps with equality constraints), in one analysis, without doing something extraordinary?

Thanks.

Replied on Thu, 06/26/2014 - 23:05
Picture of user. mhunter Joined: 07/31/2009

In reply to by metavid

Yes, that's correct. The way I've done this before is like the following:


grpmodels <- list()
dataL <- list()
for(k in modelDataIndexes){
dataL[[k]] <- subsetOfYourBigDataBasedOn[k]
grpmodels[[k]] <- mxModel(name=paste('grp', k, sep=''),
model stuff, might depend on k,
paths, matrices, algebras,
expectation, fitfunction,
mxData(dataL[[k]], type='raw')
) #close model
}

groupfits <- paste("grp", modelDataIndexes, ".fitfunction", sep="")
cmod <- mxModel(model='Container', grpmodels, mxFitFunctionMultigroup(groupfits))
cfit <- mxRun(cmod)

Replied on Sat, 06/28/2014 - 19:01
No user picture. metavid Joined: 06/23/2014

In reply to by mhunter

Thank you for providing an example of the analysis.