Programming the statistical procedures from SAS

interpretation LS means

Occasional Contributor
Posts: 6

interpretation LS means

[ Edited ]

Hello to everyone! First off all, I hace to apologize for my bad english. 


I am working with repeated measures in time, a longitudinal study.

I do not know how to interpretate the results of the table of LS means.

I need to know in every time, which treatment is diferent. I mean, I need to know time by time,if there exist stadictics differences between treatments, and which treatment is diferent from the other.


I am going to be very thankful. I really need your help! 

Here It attached the table of the LS means.

Tiempo=Time, is every times I have took the sample.



Respected Advisor
Posts: 2,655

Re: interpretation LS means

I note that you have some non-estimable main effect LSmeans, so I am going to suggest the following, assuming the model is fit in PROC MIXED:


proc mixed data=yourdataset;
class treatment time subjectid;
model response_variable=treatment*time;
repeated time/subject=subjectid type=sp(pow)(t);
lsmeans treatment*time;
slice treatment*time / sliceby=time diff;

Some things to note here.  I see that your time points are not equally spaced.  In yourdataset, define t=time, so that you will have a continous version of time to feed into the spatial power covariance structure.  The key here is the SLICE statement.  This should enable you to get differences between lsmeans for treatment at each time point where data exists for the treatments.  At some points, only one treatment was measured, so no difference can be calculated.


Steve Denham

Ask a Question
Discussion stats
  • 1 reply
  • 2 in conversation