How to correctly specify WithinDesign for fitrm
Mostrar comentarios más antiguos
I am trying to use matlab function fitrm. But the input 'WithinDesign' does not seem to make any sense to me. It seems as anything with the same length as the number of repeated measures is acceptable and the final output seem independent of the this WithinDesign. Take for instance:
load repeatedmeas
rm = fitrm(between,'y1-y8 ~ Group*Gender','WithinDesign',within)
ranova(rm)
and
load repeatedmeas
rm = fitrm(between,'y1-y8 ~ Group*Gender','WithinDesign',[1:8])
ranova(rm)
and
load repeatedmeas
rm = fitrm(between,'y1-y8 ~ Group*Gender','WithinDesign',zeros(8,1))
ranova(rm)
all produces the exact same output, as shown in the attached image.
Could someone please explain to me why they are all the same. Since its all the same what is the point of specifying it?. Also could some explain the design matrix 'within', What is it really telling the program to do, any reference to SPSS would be great.
Thanks.
Respuesta aceptada
Más respuestas (1)
Ahmed Ramadan
el 26 de Jul. de 2018
To correctly specify within design, you need to modify your ranova command as follows.
ranovatbl = ranova(rm,'WithinModel','w1+w2')
On that page, you'll see different p-values for the two cases:
- ranovatbl = ranova(rm)
- [ranovatbl,A,C,D] = ranova(rm,'WithinModel','w1+w2')
1 comentario
Adam Danz
el 22 de Mayo de 2019
That only specifies the within-subject variable names. The question was regarding the within-subject model input to fitrm(). An example of that is here:
Categorías
Más información sobre Repeated Measures and MANOVA en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!