I am trying to conduct a propensity score analysis using inverse probability of treatment weighting (IPTW) using PROC PHREG. I am modeling "P_OUTCOME"against the explanatory variable "INDEX_HS". I have already coded my standardized weights as "sw", and trimmed the dataset for extreme weights.
My tables have an observation for each person as follows:
Obs INDEX_HS P_OUTCOME ps id ExpPrev sw
I have included my PROC PHREG coding below along with the output I get. The program returns ratio measures (and confidence intervals) that are closely centered around one. I also noticed in the output that the total is equal to the number of events, which I expected to roughly simulate what I see in my raw dataset. I also have a very high value for the log likelihood.
What am I missing? What might cause this issue? For all I know this is running correctly and I'm just misinterpreting the output but if someone could help me I'd really appreciate i
proc phreg data = iptw_trimmed covs(aggregate); ** Robust variance **;
id id;
model P_OUTCOME = INDEX_HS / rl;
freq sw / notruncate; run;
The PHREG Procedure
Model Information
Data Set WORK.IPTW_TRIMMED
Dependent Variable P_OUTCOME
Frequency Variable sw
Ties Handling BRESLOW
Number of Observations Read 65634
Number of Observations Used 65634
Sum of Frequencies Read 63536.25
Sum of Frequencies Used 63536.25
Summary of the Number of Event and Censored Values
Percent
Total Event Censored Censored
63536.3 63536.3 0 0.00
Convergence Status
Convergence criterion (GCONV=1E-8) satisfied.
Model Fit Statistics
Without With
Criterion Covariates Covariates
-2 LOG L 1403039.2 1403039.2
AIC 1403039.2 1403041.2
SBC 1403039.2 1403050.2
Testing Global Null Hypothesis: BETA=0
Test Chi-Square DF Pr > ChiSq
Likelihood Ratio 0.0000 1 1.0000
Score (Model-Based) 0.0000 1 0.9959
Score (Sandwich) 0.0070 1 0.9332
Wald (Model-Based) 0.0000 1 1.0000
Wald (Sandwich) 0.0000 1 1.0000
Is it possible that I'm modeling the risk of NOT having the outcome? Would that explain these results? My outcome is extremely rare.
That could be. I wonder if you could use one of the other procedures, such as surveyfreq, for this analysis. It appears that there is no censoring, so an analysis that requires all of the data would be equivalent. At least those would allow you to specify the outcome one way or the other.
Steve Denham
Don't miss out on SAS Innovate - Register now for the FREE Livestream!
Can't make it to Vegas? No problem! Watch our general sessions LIVE or on-demand starting April 17th. Hear from SAS execs, best-selling author Adam Grant, Hot Ones host Sean Evans, top tech journalist Kara Swisher, AI expert Cassie Kozyrkov, and the mind-blowing dance crew iLuminate! Plus, get access to over 20 breakout sessions.
Learn the difference between classical and Bayesian statistical approaches and see a few PROC examples to perform Bayesian analysis in this video.
Find more tutorials on the SAS Users YouTube channel.