Programming the statistical procedures from SAS

How do I use the estimate statement for between subject comparisons

Reply
Occasional Contributor
Posts: 7

How do I use the estimate statement for between subject comparisons

Hi, I am trying to use the estimate statement to make between-subject comparisions. I have managed to do so with the first estimate statement for the time, but I am unable to do so for the groups. I am getting the error "WARNING: More coefficients than levels specified for effect Group. Some coefficients will be ignored.". The code I am using is below, the part in bold is getting the error. Thank you.

 

 

proc mixed data=work.all;
class group ID time;
model HSP27=group time group*time time0 /cl;
repeated time/subject=ID(group) r rcorr type=vc;
ods output covparms=cov rcorr=corr;

 

estimate 'time2-time4' time 1 - 1 0 0 0 0 0 0 group*time 1 - 1 0 0 0 0 0 0;
estimate 'time2-time6' time 1 0 - 1 0 0 0 0 0 group*time 1 0 - 1 0 0 0 0 0;
estimate 'time2-time8' time 1 0 0 - 1 0 0 0 0 group*time 1 0 0 - 1 0 0 0 0;
estimate 'time2-time10' time 1 0 0 0 - 1 0 0 0 group*time 1 0 0 0 - 1 0 0 0;
estimate 'time2-time12' time 1 0 0 0 0 - 1 0 0 group*time 1 0 0 0 0 - 1 0 0;
estimate 'time2-time14' time 1 0 0 0 0 0 - 1 0 group*time 1 0 0 0 0 0 - 1 0;
estimate 'time2-time16' time 1 0 0 0 0 0 0 - 1 group*time 1 0 0 0 0 0 0 - 1;

 

estimate 'Control-HSP27 t2' group 1 - 1 0 group*time 1 - 1 0 0 0 0 0 0 0;
estimate 'Control-HSP27 t4' group 1 - 1 0 group*time 1 0 - 1 0 0 0 0 0 0;
estimate 'Control-HSP27 t6' group 1 - 1 0 group*time 1 0 0 - 1 0 0 0 0 0;
estimate 'Control-HSP27 t8' group 1 - 1 0 group*time 1 0 0 0 - 1 0 0 0 0;
estimate 'Control-HSP27 t10' group 1 - 1 0 group*time 1 0 0 0 0 - 1 0 0 0;
estimate 'Control-HSP27 t12' group 1 - 1 0 group*time 1 0 0 0 0 0 - 1 0 0;
estimate 'Control-HSP27 t14' group 1 - 1 0 group*time 1 0 0 0 0 0 0 - 1 0;
estimate 'Control-HSP27 t16' group 1 - 1 0 group*time 1 0 0 0 0 0 0 0 - 1;
run;

Respected Advisor
Posts: 3,773

Re: How do I use the estimate statement for between subject comparisons

You have 9 coefficients for group*time.

Respected Advisor
Posts: 2,655

Re: How do I use the estimate statement for between subject comparisons

This is a really good time to look at the documentation for the LSMESTIMATE statement, and at the nonpositional syntax method of coding estimates, contrasts and lsmestimates.

 

Steve Denham

Ask a Question
Discussion stats
  • 2 replies
  • 179 views
  • 0 likes
  • 3 in conversation