BookmarkSubscribeRSS Feed
☑ This topic is solved. Need further help from the community? Please sign in and ask a new question.
lbrion
Calcite | Level 5

This is a follow-up question regarding the poster "odds ratio from procedure causaltrt".

I am using SAS version 9.4.

I am trying to obtain OR and RR from proc causaltrt.

Here are my codes for causaltrt:

 

ods graphics on;

proc causaltrt data=nec METHOD=AIPW  covdiffps poutcomemod ppsmodel  nthreads=10 ;

class  INVASIVE (ref=first) multbirth (ref=first)  GAgrp4 (ref=first)   BM34 (ref=first)

sepsisNEC (ref=first)  group  (ref=first)  support  (ref=first) invasive  (ref=first)  ;

psmodel EarlyfeeddBM (ref=FIRST) =  multbirth support  group  gagrp4/plots=(pscovden weightcloud psdist lps) WGTFLAG=10  ;

model NECIII (event=last) = BM34 sepsisNEC invasive /dist=bin ;

bootstrap bootci(all) nboot=5000 seed=1234 plots=hist(effect)  ;

output out=out ps=ps ipw=AIPW;

ods output CausalEffects=ce;

run;

 

 

Using StatDave's recommendation I obtained negative values for the lower limit of CI for RR and OR see below.

 

Nonlinear Function Estimate

 

Label

Estimate

Standard Error

Wald Chi-Square

Pr > ChiSq

Alpha

Lower

Upper

Rel Risk of POMs

1.1374

0.6287

3.27310

0.0704

0.05

-0.09480

2.3697

 

 

Name

Estimate

B_p1

0.01810

B_p2

0.01592

 

 

Nonlinear Function Estimate

 

Label

Estimate

Standard Error

Wald Chi-Square

Pr > ChiSq

Alpha

Lower

Upper

Odds Ratio of POMs

1.1400

0.6411

3.16200

0.0754

0.05

-0.1165

2.3965

 

 

 

Therefore I cannot use this method for my data.

 

I would like to follow Michael's  recommendation but am unable to do so:

"Instead what you can do is use the potential outcome mean estimates that are reported to compute the odds ratio, i.e. (POM1*(1-POM0) )/ (POM0 * (1-POM1) ). To compute confidence limits for this estimate you could apply the delta method. The Analysis of Causal Effects table reports estimates for the standard deviation of POM1 and POM2 and you can obtain the estimate for their covariance by using the identity VAR(ATE)=VAR(POM1 - POM0 ) = VAR(POM1) + VAR(POM0)- 2*COVAR(POM1, POM2)."

 

Could you provide me the codes I need to use to  accomplish this?

thanks

1 ACCEPTED SOLUTION

Accepted Solutions
StatDave
SAS Super FREQ

In your original post on this, I first showed how to estimate the POM difference using the NLMeans macro, but then I showed code that implements Michael's suggestion. The delta method does not guarantee that the lower confidence limit will be nonnegative. In these cases, a negative lower limit is typically treated as zero.

View solution in original post

3 REPLIES 3
StatDave
SAS Super FREQ

In your original post on this, I first showed how to estimate the POM difference using the NLMeans macro, but then I showed code that implements Michael's suggestion. The delta method does not guarantee that the lower confidence limit will be nonnegative. In these cases, a negative lower limit is typically treated as zero.

lbrion
Calcite | Level 5

Thanks a lot for your response!

Much appreciated.

Luc

lbrion
Calcite | Level 5

Thanks a lot!

Luc

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
  • 3 replies
  • 777 views
  • 1 like
  • 2 in conversation