Least Square Means (LSM) for incomplete data [Software]
Hi Yicaoting,
that's an interesting post.
Hrmmmmmmmfff... very good questions. I don't have a lot of insight.
It is common in the linear BE model to disregard all data from any subject that has a missing value. That's why SAS treats dataset2 and dataset3 equally. I get the same result in R with the function call
However, there is -at least in theory- an alternative when one value is missing for a period in one (or more) subject(s) and that is to try a maximum likelihood approach where you specify subject as random in the mixed model and trt+seq+per all fixed. When I do that in R, I actually can reproduce your values from WNL (but I do not have WNL on my machine so cannot play around). It could thus be that WNL actually uses a mixed model to obtain the estimates? Someone, go read the manual?! If this is indeed the case then I am pretty sure you can't obtain easily the treatment effects (they shouldn't be called LSM's if obtained by REML). At least from a theoretical perspective one can argue that the REML-based estimates are more credible, I think. But am no expert at all.
I am still struggling with the SE's. Will get back to you if I manage to figure out something.
EM.
that's an interesting post.
❝ For dataset 3, results from WNL:
❝ LSM_R: 82.5594 (WNL) vs 82.5594 (SAS)
❝ LSM_T: 79.6926 (WNL) vs 79.2074 (SAS)
❝ Obviously, the results are different. So my question are:
❝ 1) which is reliable?
❝ 2) for dataset3, how to manually calc LSM_T to obtain WNL's 79.6926 or SAS's 79.2074, I tried several methods, all were failed.
❝ 3) for dataset3, how to manually obtain WNL's R-T PE's SE=3.7492?
Hrmmmmmmmfff... very good questions. I don't have a lot of insight.
It is common in the linear BE model to disregard all data from any subject that has a missing value. That's why SAS treats dataset2 and dataset3 equally. I get the same result in R with the function call
lm
.However, there is -at least in theory- an alternative when one value is missing for a period in one (or more) subject(s) and that is to try a maximum likelihood approach where you specify subject as random in the mixed model and trt+seq+per all fixed. When I do that in R, I actually can reproduce your values from WNL (but I do not have WNL on my machine so cannot play around). It could thus be that WNL actually uses a mixed model to obtain the estimates? Someone, go read the manual?! If this is indeed the case then I am pretty sure you can't obtain easily the treatment effects (they shouldn't be called LSM's if obtained by REML). At least from a theoretical perspective one can argue that the REML-based estimates are more credible, I think. But am no expert at all.
I am still struggling with the SE's. Will get back to you if I manage to figure out something.
EM.
Complete thread:
- Least Square Means (LSM) for incomplete data yicaoting 2011-10-07 18:27 [Software]
- Least Square Means (LSM) for incomplete dataElMaestro 2011-10-07 21:00
- random vs. fixed Helmut 2011-10-07 21:35
- random vs. fixed ElMaestro 2011-10-07 23:18
- random vs. fixed Helmut 2011-10-08 14:48
- random vs. fixed ElMaestro 2011-10-08 15:26
- random vs. fixed Helmut 2011-10-08 16:02
- random vs. fixed ElMaestro 2011-10-08 15:26
- random vs. fixed Helmut 2011-10-08 14:48
- random vs. fixed ElMaestro 2011-10-07 23:18
- random vs. fixed Helmut 2011-10-07 21:35
- Least Square Means (LSM) for incomplete dataElMaestro 2011-10-07 21:00