how marginal means (also called least square means) and standard deviation are calculated from repeated measure model? I do not have any "groups" in my data, I only have 76 samples each measured in 6 locations (1 location missing in one sample)

I would like to calculate marginal means and std from repeated measure model or directly from raw data. I do not have any group in my data. I have 76 samples and each measured in six different location in the same sample. I would like to see effect of locations and I used repeated measure but I would like to calculate marginal mean and standard deviation of the data from the repeated measure model.

 Respuesta aceptada

With this model I believe the marginal means and standard deviations for the different locations are simply the raw means and standard deviations of the scores at each of the locations. The model does not seem to include anything other than location that could be adjusted for (e.g., covariates).

6 comentarios

There is one function to compute marginal mean tbl = margmean(rm,vars) but I dont have variables for which to compute the marginal means. Is there anyway to do this? @Jeff Miller
Is there any way to use repeated measure model in multcompare function as below? Again I dont have any grouping in the data. T = multcompare(rm,'Group')
I'm not sure what command you used to fit the repeated measures model in the first place. If it was fitrm, then that command will assign the name 'Time' to you location factor as a default. Then you can use this factor name in multcompare. So, I guess you want something like this:
rm=fitrm(t,'Location1-Location6~1')
multcompare(rm,'Time')
Thank you. I used the following command for rm model. where Meas = table([1 2 3 4 5 6]','VariableNames',{'Measurements'});
rm = fitrm(data,'L1-L6 ~ 1','WithinDesign',Meas);
Look at the value of rm.WithinFactorNames. This is the name of the variable that you shouldo pass to multcompare. Or you could just use this:
multcompare(rm,rm.WithinFactorNames)
Thanks a million. I got exactly the same results when I used the function you mentioned. Because WithinFactorNames in rm is Time. Thanks again.

Iniciar sesión para comentar.

Más respuestas (0)

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by