Statistical Procedures

Programming the statistical procedures from SAS
BookmarkSubscribeRSS Feed
April2211
Fluorite | Level 6

I want to generate a spline plot with "proc glimmix-effect", by using "estimate" to obtain odds ratio and the confidence interval, as shown below.

82aa9690b69cf68aa7be91bc67c5f54.png

Can I use a loop macro and specify a reference (a reference point will set at 5th) in "estimate" statement to realize? Thank you very much!

The macro is as follows

%macro est(ref=, start=, end=, by=);
%Do i = 1 %To %eval(%SysFunc( Ceil( %SysEvalF( ( &End - &Start ) / &By ) ) ) +1) ;
%Let value=%SysEvalF( ( &Start - &By ) + ( &By * &I ) ) ;
estimate "&value." spl [-1, &ref] [1, &value] / exp cl;
%end;
%mend est;

The idea comes from this post.

Any help is appreciated!!😩

 

sas-innovate-white.png

Our biggest data and AI event of the year.

Don’t miss the livestream kicking off May 7. It’s free. It’s easy. And it’s the best seat in the house.

Join us virtually with our complimentary SAS Innovate Digital Pass. Watch live or on-demand in multiple languages, with translations available to help you get the most out of every session.

 

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
  • 0 replies
  • 750 views
  • 0 likes
  • 1 in conversation