[MINC-users] R/RMINC Linear Mixed-Effect Models with mincApply

Jason Lerch jason at phenogenomics.ca
Fri May 18 08:17:55 EDT 2012


Howdy all,

RMINC has a mincLme function in it (which is sadly undocumented) - that should do the trick for you, but as a warning it is rather slow. Rewriting that code in C (as was done for mincLm) is somewhere on the todo list ...

Jason

On 2012-05-17, at 6:06 PM, nicolas guizard <Nicolas.Guizard at bic.mni.mcgill.ca> wrote:

> Hello Minc-Users,
> 
> I am trying to use R with Rminc to compute a mixed-effect model on
> longitudinal Jacobians of multiple subjects with multiple visits.
> 
> I didn't find a mincfunction in the Rminc library to do so, therefore, I
> used another library (http://cran.r-project.org/web/packages/nlme/index.html
> ).
> But I am not sure how to use the mincApply function to perform the analyses
> with the different variables.
> 
> Here is what I do but doesn't work:
> 
>> f <- function(x) {
>> lme(x ~  1 + gf$Visit + gf$Treatment, random = ~ gf$ID)
>> }
> 
>> lmemodel  <- mincApply(gf$File, quote(f(x)), mask)
> 
>> Error in eval(expr, envir, enclos) : object 'ID' not found
> 
> 
> Where gf is my data table.
> 
> Regards,
> Nicolas
> _______________________________________________
> MINC-users at bic.mni.mcgill.ca
> http://www.bic.mni.mcgill.ca/mailman/listinfo/minc-users


More information about the MINC-users mailing list