Programming the statistical procedures from SAS

proc mixed - lsmeans at values - how to use vectors instead of values

Accepted Solution Solved
Reply
New Contributor
Posts: 4
Accepted Solution

proc mixed - lsmeans at values - how to use vectors instead of values

Hi all,

 

Using SAS version 9.3, I would like to check with you if there could be an alternative to the following SAS code where a list of lsmeans statements is written according to couples of values (auc1, auc2).

Would it be possible to insert directly a vector of values without using any loop or an other SAS procedure than proc mixed would be needed?

 

    ods output lsmeans=lsmeans;
          proc mixed data=data noclprint plots=none;
               by paramn avisitn;
                class age one;
                model chg= age one auc1 auc2 / solution cl;

                %do i = 1 %to &nobs; 

                  %* recuperated ith values from auc1 and auc2 lists of values;

                  %let auc1=%scan(&list_auc1,&i,%str( ));

                  %let auc2=%scan(&list_auc2,&i,%str( ));

                   lsmeans one / at (auc1 auc2)=(&auc1 &auc2) e cl om;

                %end;

  run;

 

Thank you very much for your help
 

 

 

 

 


Accepted Solutions
Solution
‎03-17-2016 07:29 AM
Trusted Advisor
Posts: 1,115

Re: proc mixed - lsmeans at values - how to use vectors instead of values

Hi @bambrosi,

 

Isn't it a strange coincidence that a very similar question has been asked only one hour ago? Please see this thread for an answer.

View solution in original post


All Replies
Solution
‎03-17-2016 07:29 AM
Trusted Advisor
Posts: 1,115

Re: proc mixed - lsmeans at values - how to use vectors instead of values

Hi @bambrosi,

 

Isn't it a strange coincidence that a very similar question has been asked only one hour ago? Please see this thread for an answer.

New Contributor
Posts: 4

Re: proc mixed - lsmeans at values - how to use vectors instead of values

Thank you very much and sorry for the repeated question. With my colleague we independently asked the same question on the SAS community.

☑ This topic is solved.

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

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