- Mark as New
- Bookmark
- Subscribe
- Mute
- RSS Feed
- Permalink
- Report Inappropriate Content
Posted 12-14-2021 06:32 AM
(749 views)
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.
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!!😩