BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
arodriguez
Lapis Lazuli | Level 10

Hi everyone and thanks for read it,

I am trying to calculate the treatment effect with the next prog glm.

     proc glm data=_aux_;

     class treatmentn /ref=FIRST;

     model _change = treatmentn /solution clparm;

     lsmeans treatmentn / pdiff=all CL stderr TDIFF adjust=bonferroni;

     run;

          quit;


For the unadjusted treatment effect I use the model, and for the adjusted I use it lsmeans.

The problem is that when I try to put ref='1'  it give me error

ERROR 22-322: Syntax error, expecting one of the following: FIRST, LAST.

ERROR 76-322: Syntax error, statement will be ignored.

and ref='level' must be a valid value. Any idea?

Thanks for the help,

  Toni

1 ACCEPTED SOLUTION

Accepted Solutions
SteveDenham
Jade | Level 19

Try:

class treatmentn(ref='1');

The global options (after the slash options) are only FIRST and LAST.  A formatted value has to be directly associated with the variable.

Steve Denham

View solution in original post

2 REPLIES 2
SteveDenham
Jade | Level 19

Try:

class treatmentn(ref='1');

The global options (after the slash options) are only FIRST and LAST.  A formatted value has to be directly associated with the variable.

Steve Denham

arodriguez
Lapis Lazuli | Level 10

Yes, it seems to work.

Thank you a lot.

  Toni

sas-innovate-2024.png

Join us for SAS Innovate April 16-19 at the Aria in Las Vegas. Bring the team and save big with our group pricing for a limited time only.

Pre-conference courses and tutorials are filling up fast and are always a sellout. Register today to reserve your seat.

 

Register now!

What is ANOVA?

ANOVA, or Analysis Of Variance, is used to compare the averages or means of two or more populations to better understand how they differ. Watch this tutorial for more.

Find more tutorials on the SAS Users YouTube channel.

Discussion stats
  • 2 replies
  • 1440 views
  • 0 likes
  • 2 in conversation