[R-sig-ME] How to model multilevel data of repeated measures using nlme function in R? and Is it okay to include categorical variable to random slopes model?

Ilgim Hepdarcan ilgim.hepdarcan at izmirekonomi.edu.tr
Mon Feb 27 23:36:05 CET 2017


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 within-subject design. Participants are between factors and gender of the participant is the covariate of that between factor. 

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 and I'm trying to conduct multilevel analysis by using R. My fixed variable is gender and my random variable is Nback Types (which has 4 levels, 0-, 1-, 2-, and 3-back) which is categorical. In my model, participants are nested within nback types. 

Because NbackType is categorical, I've wondered whether it is okay to test random slopes as in my model 1. 

Last but not least, would you share your opinions about how to interpret this random slopes model? 

#Random slopes model (model 1) 



model1.nbackOpt1 = lmer (Optode1 ~ NbackType * gender + 


na.action = na.exclude, 




#Random intercepts model (model 2) 



model2.nbackOpt1 = lmer (Optode1 ~ NbackType * gender + 


na.action = na.exclude, 



Ilgým Hepdarcan 
Izmir University of Economics 
Experimental Psychology MD 

	[[alternative HTML version deleted]]

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