Programming the statistical procedures from SAS

PROC GLM

Accepted Solution Solved
Reply
Frequent Contributor
Posts: 144
Accepted Solution

PROC GLM

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


Accepted Solutions
Solution
‎01-10-2014 09:09 AM
Respected Advisor
Posts: 2,655

Re: PROC GLM

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


All Replies
Solution
‎01-10-2014 09:09 AM
Respected Advisor
Posts: 2,655

Re: PROC GLM

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

Frequent Contributor
Posts: 144

Re: PROC GLM

Yes, it seems to work.

Thank you a lot.

  Toni

🔒 This topic is solved and locked.

Need further help from the community? Please ask a new question.

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