BookmarkSubscribeRSS Feed
🔒 This topic is solved and locked. Need further help from the community? Please sign in and ask a new question.
sseb
Fluorite | Level 6

Hi,

I am looking to pool results after using a macro by @LinusS_ to output hazard ratios for each level of a continuous exposure. The dataset looks something like this:

 

_imputation_     Exposure     Estimate     StdErr
1                10           -0.3         0.4            
...              ...          ...          ...
1                60           -0.6         0.2

And so on for each imputation cycle for up to 10 imputed datasets.

 

I'm a novice when it comes to using PROC MIANALYZE, so I'm not sure how to use it when the dataset I'm trying to pool the data from wasn't created by a SAS PROC. Do I use parm= or data=? Any help would be greatly appreciated! 

1 ACCEPTED SOLUTION

Accepted Solutions
LinusS_
Fluorite | Level 6

It's probably easier to use data, I used this code recently:

proc sort data=Estimates;
	by Label _Imputation_;
run;
ods select none;
proc mianalyze data = Estimates;
	by Label;
	modeleffects Estimate;
	stderr StdErr;
	ods dataset ParameterEstimates=parms;
run;
ods select all;

Note that I use the unexponentiated estimates, since Rubin's rules requires the estimates to be approximately normally distributed, so just exponentiate the results in parms to get HR:s and CI:s.

View solution in original post

1 REPLY 1
LinusS_
Fluorite | Level 6

It's probably easier to use data, I used this code recently:

proc sort data=Estimates;
	by Label _Imputation_;
run;
ods select none;
proc mianalyze data = Estimates;
	by Label;
	modeleffects Estimate;
	stderr StdErr;
	ods dataset ParameterEstimates=parms;
run;
ods select all;

Note that I use the unexponentiated estimates, since Rubin's rules requires the estimates to be approximately normally distributed, so just exponentiate the results in parms to get HR:s and CI:s.

SAS Innovate 2025: Call for Content

Are you ready for the spotlight? We're accepting content ideas for SAS Innovate 2025 to be held May 6-9 in Orlando, FL. The call is open until September 16. Read more here about why you should contribute and what is in it for you!

Submit your idea!

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
  • 1 reply
  • 796 views
  • 1 like
  • 2 in conversation