You are here

Multiple group analysis

5 posts / 0 new
Last post
metavid's picture
Offline
Joined: 06/23/2014 - 16:15
Multiple group analysis

Hi,

I hope this is not asked yet. Is there a maximum number of groups that can be specified with multiple group analysis on OpenMx? For example, 100 groups? And are there special steps to be taken when doing multiple group analysis if a number of groups is exceeded (e.g. 50 or 100)?

Thank you.

metavid

mhunter's picture
Offline
Joined: 07/31/2009 - 15:26
No fixed limit

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.

metavid's picture
Offline
Joined: 06/23/2014 - 16:15
Operation in R

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.

mhunter's picture
Offline
Joined: 07/31/2009 - 15:26
Yes

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)
metavid's picture
Offline
Joined: 06/23/2014 - 16:15
Thanks

Thank you for providing an example of the analysis.

Log in or register to post comments