How to specify this mixed effects model?
Mostrar comentarios más antiguos
I need to specify a model (for input into fitlme). My experimental design is very similar to the indomethacin example in the documentation for nlmefit, but with a slight extension. I'm not sure how to specify the model.
In that example, there are 6 test subjects, who represent a sample from the broader population. It is therefore appropriate to use a random effect to capture the subject-specific effect (as the example shows).
If it were appropriate to use fitlme for the indomethacin example, the model could be specified in Wilkinson notation as
'concentration ~ 1 + time + (time|subject)'
The model has a fixed effect for time, and (possibly correlated) random effects for the intercept and slope for each subject.
My extension of this example is that for each subject, I am going to take their blood sample and have their blood level tested two or more times by the lab at each time point. (This is known as using "technical replicates", to account for variability in the chemical test itself.)
How would I specify that model? My best guess is to define a categorical replicate variable, which has a unique value for each blood sample. The indomethacin example has 11 time points and 6 subjects, for a total of 66 observations. If I now want 2 technical replicates, then I would have 132 observations, where I would define
replicate = categorical((1:132)');
and the model would be specified as
'concentration ~ 1 + time + (time|subject) + (time|subject:replicate)'
Does that seem right?
1 comentario
the cyclist
el 2 de Feb. de 2018
Editada: the cyclist
el 2 de Feb. de 2018
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre Linear Predictive Coding en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!