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

Don't miss out on SAS Innovate - Register now for the FREE Livestream!

Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.

 

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
  • 1451 views
  • 0 likes
  • 2 in conversation