How to define a variable as an ordered factor for mixed effect model?
3 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Hello,
I am trying to run the mixed effect model below:
mod = 'y ~ 1 + context + rep + lat + context:rep + (1|name)'; mdl = fitlme(b,mod);
Right now, 'rep' is an ordinal variable with values of 1,2,3 or 4. The model output gives me coefficient values for each value of 'rep' for the fixed effect of 'rep' and one for each value of 'rep' and its interaction with 'context' (which only has two levels). This is not what I want though. I would like the mixed effect model to consider it as an ordered factor (analogy to R) and give me one coefficient for the fixed effect of 'rep' and one coefficient for its interaction with 'context'.
Do you know how I could do that?
0 Commenti
Risposte (0)
Vedere anche
Categorie
Scopri di più su Particle & Nuclear Physics in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!