Hi,

I am new to mixed models and not sure how to design a model for my data to use with the lmer function. 


I am trying to study the effect of a drug (treatment) in subjects along time. For every subject we measure activity from a (variable) number of neurons at different time points. Therefore, the neuron measurement is nested within subject. I would also like to use the baseline activity measurement as a covariate for each neuron. This is a small sample of the dataset:

subject treatment neuron baseline time activity 
1 1 1 3.06 1 7.02 
1 1 1 3.06 2 6 
1 1 1 3.06 3 9 
1 1 2 3 1 5 
1 1 2 3 2 6 
1 1 2 3 3 9 
2 2 3 4.77 1 3 
2 2 3 4.77 2 2 
2 2 3 4.77 3 1 
3 2 3 2.14 1 2.03 
3 2 3 2.14 2 2 
3 2 3 2.14 3 1.5 

I was wondering if the following would be an appropriate model.

activity ~ baseline + treatment*time + (1|subject:neuron) + (1|time)


I am also wondering how I could deal with the problem of missing data. Is there a function/package that could be helpful in this design?

I hope you can help.

Best regards,

Carlos
	[[alternative HTML version deleted]]

