[R-sig-ME] Using lme function in R in a brain imaging study

Ilgim Hepdarcan ilgim.hepdarcan at izmirekonomi.edu.tr
Sat Apr 1 14:10:48 CEST 2017


Dear all, 
my study consists of 3 trials and each trial includes four different n-back types, 0-,1-,2-,3-back. Each participant had 12 n-back conditions, in a different order. Therefore, my design is a mixed design in which each participant were showed each n-back condition, which is a within-subject factor. Participants and gender of the participants are between-subject factors. 


While participants were performing n-back task, I have measured their dorsolateral prefrontal cortex activation via 16-channeled fNIR and obtained oxygenated hemoglobin measures from each of the 16 channels. Therefore, 16 oxygenated hemoglobin measures are my dependent variables. When I've checked examples on Internet, I always faced with examples of random variables which are continuous variables, like time or treatment. Because my random variables Trials and Nback Types (0-, 1-, 2-, and 3-back) are categorical variables, I've confused when I construct my multilevel model in R. Also, in my model repeated measures are nested within participants. 




Last but not least, I wonder if it is okay to construct my model based in two-way repeated measures anova using lme function in R? 







> library(nlme) 

> nullmodel = lme(Optode1 ~ 1, 

+ random = ~1|participant/Trial/NbackType, 

+ data = oxyHbConditionandTrialCellbyCell, 

+ na.action = na.exclude, 

+ method = "ML") 

> summary(nullmodel) 




> NbackType_Trial = update(baseline, .~. + NbackType*Trial) 

> summary(NbackType_Trial) 




> NbackType_Trial_gender = update(NbackType_Trial, .~. + NbackType*Trial*gender) 

> summary(NbackType_Trial_gender) 






> anova(nullmodel,NbackType_Trial,NbackType_Trial_gender) 








Thank you in advance, 

Ilgým Hepdarcan 
Izmir University of Economics 
Experimental Psychology MD 





	[[alternative HTML version deleted]]



More information about the R-sig-mixed-models mailing list