Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Propensity score matching for Cox regression analysis

744 views
Skip to first unread message

Jo Blois

unread,
Oct 27, 2009, 8:42:47 AM10/27/09
to
Hi,

I would like to match patients from a very large registry on
propensity score for being on a particular pharmacological treatment.
Then, I would like to see the effect that such a treatment has on
mortality with a cox regression analysis.

Using the Dr Jon Painter's Macro, the matching is possible, only the
match patients now appear on the same case row and the variables now
have different names (treatm and treatm2).

Does someone know how we can use this information - that is, from the
match - and reorganize it in order to run a Cox regression analysis
with the binary variable (treatm) as a covariate?

Thank you so much for usefull answer.

Brendan Halpin

unread,
Oct 27, 2009, 4:11:23 PM10/27/09
to
Conceptually, how do you intend to model this? My understanding of the
PS approach is that you look at the *difference* between the
case--control pairs. In the simplest case (continuous outcome) this
involves a matched-pairs t-test -- how do you see this translating to
the hazard-rate modelling context?

Brendan
--
Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
mailto:brendan...@ul.ie http://www.ul.ie/sociology/brendan.halpin.html

Jo Blois

unread,
Oct 28, 2009, 4:56:26 AM10/28/09
to
On 27 oct, 21:11, Brendan Halpin <brendan.hal...@ul.ie> wrote:
> Conceptually, how do you intend to model this? My understanding of the
> PS approach is that you look at the *difference* between the
> case--control pairs. In the simplest case (continuous outcome) this
> involves a matched-pairs t-test -- how do you see this translating to
> the hazard-rate modelling context?
>
> Brendan
> --
> Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland
> Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
> mailto:brendan.hal...@ul.ie  http://www.ul.ie/sociology/brendan.halpin.html

Thank you for your response,

Well, since the registry I work with contains many (more than 5000)
cases (patients), followed for up to 8 years and for which I have
vital status information (date of death), and since some patients have
been exposed to specific medications, but not randomized to them, I
would like to first, define a propensity score for each patient for
being or not on a specific medication (for example, beta-blockers -
that I can do), match each exposed (treated) patient with the
unexposed (untreated) patient with the lowest difference in propensity
score (this is possible with the Dr John Painter Macro - which, by the
way, seems to be the only method of doing so with SPSS), discard the
unmatched patients.

Then we would have exposed and unexposed patients with relatively
similar covariates who would otherwise differientiate only by the
binary exposure to treatment.

From there, we could run a Cox regression analysis with exposure to
treatment as a covariate. The problem is that the Dr Painter macro
"delivers" match patients on the same row, so to spss, these are
different variable of a same case.

Is this clearer?

Thank you again for any answer

Brendan Halpin

unread,
Oct 28, 2009, 5:28:31 AM10/28/09
to
On Wed, Oct 28 2009, Jo Blois wrote:

> From there, we could run a Cox regression analysis with exposure to
> treatment as a covariate. The problem is that the Dr Painter macro
> "delivers" match patients on the same row, so to spss, these are
> different variable of a same case.
>
> Is this clearer?

The macro delivers you matched pairs, which we can regard as being
(imperfectly) identical except for outcome and treatment. The logic of
the PS approach is to look at this pairwise difference. You are
suggesting breaking the pairwise link, it seems, and comparing two
separate samples of cases and controls. That seems to me to be throwing
away huge amounts of statistical power. It is equivalent to having
before/after measures on individuals, where a matched-pairs t-test would
be appropriate, and using an independent-samples t-test instead.

This is not to say that using PS to draw a matched sample of controls
(while throwing away the key pairwise matching information) is
completely pointless. It can be a way of getting "matched" samples for
conventional analysis, but it is missing the core point of the
propensity score approach.

Brendan
--
Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147

mailto:brendan...@ul.ie http://www.ul.ie/sociology/brendan.halpin.html

Jo Blois

unread,
Oct 28, 2009, 6:19:21 AM10/28/09
to
[...]

> This is not to say that using PS to draw a matched sample of controls
> (while throwing away the key pairwise matching information) is
> completely pointless. It can be a way of getting "matched" samples for
> conventional analysis, but it is missing the core point of the
> propensity score approach.
>
> Brendan

> Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland


> Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147

> mailto:brendan.hal...@ul.ie  http://www.ul.ie/sociology/brendan.halpin.html

Thanks again for your clear response.

Suppose I do not "break" the match. How could I use this match to see
the effect of treatment on survival with a Cox regression analysis. In
other words, if suppose patient 1 on treatment (treatm = 1) is matched
on the same row with, for examble patient 46 (treatm = 0) and so on
for up to, for example, 1 500 matched patients, and if I manage to
modify the macro to import (in the same row, as a different variable,
information on death date for untreated patients) then, how could I
calculate Hazard Ratios for the effect of being on treatment?

Jon

Brendan Halpin

unread,
Oct 28, 2009, 7:23:16 AM10/28/09
to
On Wed, Oct 28 2009, Jo Blois wrote:

> Suppose I do not "break" the match. How could I use this match to see
> the effect of treatment on survival with a Cox regression analysis.

In most PS analyses I have seen the statistical "heavy lifting" is all
in the match, and the quantity of interest (pairwise outcome difference)
is analysed quite simply, e.g., where it is continuous, just a t-test on
the difference. With survival times that is more complicated,
particularly where you have censoring, because your quantity of interest
is the difference in survival time.

I've been googling and one or two hits are interesting: This paper
<http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2659298/> talks about
"matched Cox regression" which retains the pair-information by
stratifying on the pairs. That could be a useful approach.

These conference slides
<http://www.iscb2009.info/RSystem/Soubory/Prez%20Tuesday/S16.5%20Sitter.pdf>
suggest using the propensity score as a covariate in the hazard model
(rather than a matching device) to get less-biased estimates of the
treatment effect.


Regards,

Brendan

PS: not that it's relevant, but I'm going to attend a lecture by David
Cox this very afternoon!
--

Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147

mailto:brendan...@ul.ie http://www.ul.ie/sociology/brendan.halpin.html

Jo Blois

unread,
Oct 28, 2009, 8:34:22 AM10/28/09
to

> PS: not that it's relevant, but I'm going to attend a lecture by David
> Cox this very afternoon!
> --
> Brendan Halpin,  Department of Sociology,  University of Limerick,  Ireland
> Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147
> mailto:brendan.hal...@ul.ie  http://www.ul.ie/sociology/brendan.halpin.html


Thank you!

Before I go and read your examples, I found here an article (on the
benefit of aspirin use in a non randomized cohort) where they do
exactly what I am refering too.
If I understand well, the matched patients where "statistically"
considered as being the same patient without treatment.

Unfortunately, they used SAS and Macros specifically written for SAS.
I wonder if it is possible to do that with SPSS.

Aspirin Use and All-Cause Mortality
Among Patients Being Evaluated for Known
or Suspected Coronary Artery Disease
A Propensity Analysis
JAMA. 2001;286(10):1187-1194 (doi:10.1001/jama.286.10.1187)
http://jama.ama-assn.org/cgi/content/full/286/10/1187


Have a good Cox lecture!!

Jon

Brendan Halpin

unread,
Oct 28, 2009, 9:20:39 AM10/28/09
to
On Wed, Oct 28 2009, Jo Blois wrote:

> Unfortunately, they used SAS and Macros specifically written for SAS.
> I wonder if it is possible to do that with SPSS.
>
> Aspirin Use and All-Cause Mortality
> Among Patients Being Evaluated for Known
> or Suspected Coronary Artery Disease
> A Propensity Analysis
> JAMA. 2001;286(10):1187-1194 (doi:10.1001/jama.286.10.1187)
> http://jama.ama-assn.org/cgi/content/full/286/10/1187

Interesting. On my quick scan of it I can't see clearly that (or how)
they have used the proportional hazards model on a pairwise basis. I
think their table 4 is simply pooling the two sub-samples (i.e.,
restricting to cases and matched controls but not pairing them). The
analysis reported in figure 2 does exploit the pairings, but the
explanation of what they do is pretty cryptic.

The pooled analysis (breaking the individual match) should be do-able in
SPSS, and if you have large numbers of cases you may well have
sufficient statistical power to detect effects (but it remains much less
powerful than the within-pairs approach). Including the propensity score
as a covariate may be an interesting thing to do in that case.

To get back to your initial practical question, you can split the paired
cases (on one row) into separate cases relatively easily. How best to do
it depends on the precise layout.

If you have, outcome y, covariate c, and treatment t, duplicated as y1
c1 t1 y2 c2 t2 where y1 etc are the case's values and y2 the control's,
a logic like the following may work (not tested):

compute pairid = $casenum.
compute case = 1.
save out = cases.sav.
compute case = 0.
add files file = * /file = cases.sav.
sort cases by pairid case.

if not case y1 = y2.
if not case c1 = c2.
if not case t1 = t2.

You now have twice the number of cases, with a case (0/1) variable, y1,
c1 and t1 have the outcome, covariate and treatment values, and y2, c2 &
t2 are redundant. (The t1/t2 variables are also redundant with case.)

The VARSTOCASES command may also be suitable, and would achieve the same
outcome.

Brendan


--
Brendan Halpin, Department of Sociology, University of Limerick, Ireland
Tel: w +353-61-213147 f +353-61-202569 h +353-61-338562; Room F2-025 x 3147

mailto:brendan...@ul.ie http://www.ul.ie/sociology/brendan.halpin.html

Bruce Weaver

unread,
Oct 28, 2009, 10:21:27 AM10/28/09
to

Have you looked at the GENLIN procedure? (In the menus, Analyze -
Generalized Linear Models, and then probably Generalized Estimating
Equations. You can select from various types of models, including the
following:

Binary Response or Events/Trials Data.

• Binary logistic. Specifies Binomial as the distribution and Logit as
the link function.

• Binary probit. Specifies Binomial as the distribution and Probit as
the link function.

• Interval censored survival. Specifies Binomial as the distribution
and Complementary log-log as the link function.

Perhaps that last one will give what you want.

--
Bruce Weaver
bwe...@lakeheadu.ca
http://sites.google.com/a/lakeheadu.ca/bweaver/Home
"When all else fails, RTFM."

Jo Blois

unread,
Oct 28, 2009, 10:33:39 AM10/28/09
to
Thank you very much,

I have tried it but there is a little problem. The matching macro
lists the matched pair first but leaves the unmatched in the active
dataset.
http://www.unc.edu/~painter/SPSSsyntax/propen.txt

Now, I also mutiply the unmatched cases into pairs.

I have tried with selecting only the first 27 cases (27 cases are
matched in that example and are presented first) but the unselected
cases were doubled also.

In the first paper you refered to above
<http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2659298/>
They do not explain how they did that "matched Cox regression
analysis".
Do you think matched patients remained on the same rows or they had
to use split the paired
cases into separate cases?

Jon

Brendan Halpin

unread,
Oct 28, 2009, 2:13:11 PM10/28/09
to
On Wed, Oct 28 2009, Jo Blois wrote:

> I have tried it but there is a little problem. The matching macro
> lists the matched pair first but leaves the unmatched in the active
> dataset.
> http://www.unc.edu/~painter/SPSSsyntax/propen.txt
>
> Now, I also mutiply the unmatched cases into pairs.

You need to identify the cases (with their match info in the same row)
and drop the rest first.

> In the first paper you refered to above
> <http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2659298/>
> They do not explain how they did that "matched Cox regression
> analysis".
> Do you think matched patients remained on the same rows or they had
> to use split the paired
> cases into separate cases?

If I read it right, they used the pairs as strata. This would imply they
had two rows per pair, but a pair-id variable which they used as the
stratifying variable.

Rich Ulrich

unread,
Oct 28, 2009, 3:54:54 PM10/28/09
to
On Wed, 28 Oct 2009 11:23:16 +0000, Brendan Halpin
<brendan...@ul.ie> wrote:

>On Wed, Oct 28 2009, Jo Blois wrote:
>
>> Suppose I do not "break" the match. How could I use this match to see
>> the effect of treatment on survival with a Cox regression analysis.
>
>In most PS analyses I have seen the statistical "heavy lifting" is all
>in the match, and the quantity of interest (pairwise outcome difference)
>is analysed quite simply, e.g., where it is continuous, just a t-test on
>the difference. With survival times that is more complicated,
>particularly where you have censoring, because your quantity of interest
>is the difference in survival time.
>
>I've been googling and one or two hits are interesting: This paper
><http://www.ncbi.nlm.nih.gov/pmc/articles/PMC2659298/> talks about
>"matched Cox regression" which retains the pair-information by
>stratifying on the pairs. That could be a useful approach.
>
>These conference slides
><http://www.iscb2009.info/RSystem/Soubory/Prez%20Tuesday/S16.5%20Sitter.pdf>
>suggest using the propensity score as a covariate in the hazard model
>(rather than a matching device) to get less-biased estimates of the
>treatment effect.
>

I haven't done propensity analyses, but I've long
pushed the point that it is a big, big *waste*, to
throw away 2/3 of your data in order to select "matches"
- when you can account for the same variance by using
covariates of the match-variables. Or propensity score.

Pairing makes sense for "left eye versus right eye",
or for sibs; but hardly ever will it give greater power for
data-paried subjects, compared to good covarying.

Also, there are risks of bias when selecting sub-samples;
this is a subtle topic. People with equal "scores" will not
be equal in all respects if they are drawn from grossly
disparate populations.

Analyze all the data, with Propensity as covariate.
If you drop some patients (age? ... is relatively safe), be
very explicit in your procedures and your write-up.


--
Rich Ulrich

Jo Blois

unread,
Oct 28, 2009, 4:30:21 PM10/28/09
to
[...]

> I haven't done propensity analyses, but I've long
> pushed the point that it is a big, big *waste*, to  
> throw away 2/3  of your data in order to select "matches"
>  - when you can account for the same variance by using
> covariates of the match-variables.  Or propensity score.
>
> Pairing makes sense for "left eye versus right eye",
> or for sibs;  but hardly ever will it give greater power for
> data-paried subjects, compared to good covarying.
[..]

> Rich Ulrich

Thank you Rich for your interest in that matter

If I understand right, you would suggest not to match patient on PS
but simply use the PS as a covariate.
Would than the statistical effect of good covarying really be the same
than that of matching.

The point here is to make the two groups (on and off treatment) the
most possibly equal "as if" drawn from randomization.

The database I work with is big and there are lots of measured
variables. Matching can not compensate for non measured variables, but
since there are many in that database, I figure matching would still
be a good option.

Don't you think so?

Jon

Rich Ulrich

unread,
Oct 28, 2009, 5:00:30 PM10/28/09
to

No, I don't think so. But might not be so bad for your case
as it is some other times.

In this case, you see to have a large enough N that you
won't be hurt a whole lot by the loss of degrees of freedom
through matching.

- To the extent that the propensity score is assumed to be
valid, it is assumed to represent a linear (or suitably-linear)
relationship with the outcome. You have twiice the effective
N if the testing is not paired. You have *far* more ease
and flexibility for including other covariates if the testing is
not paired.

Pairing, you will be hurt by potential biases within matches,
and by the inability to check for extra influence of all those
factors that don't match.
- A propensity score can be high (say) for one person
who is especially old, and high for another who smokes and
drinks. If the underlying populations differ in such variables,
you *will* end up with such potential, essential "mismatches".

- Do they matter? You hope not. Can you test whether they
matter? - Not within the paired testing model.

Maybe your data won't raise such concerns. In the theory,
though, you can read about difficulties in post-hoc matching
if you look for that material. (I read some, but I've never
kept track of where that was, so I can't offer references.)


--
Rich Ulrich

Brendan Halpin

unread,
Oct 28, 2009, 6:51:45 PM10/28/09
to
On Wed, Oct 28 2009, Rich Ulrich wrote:

> I haven't done propensity analyses, but I've long
> pushed the point that it is a big, big *waste*, to
> throw away 2/3 of your data in order to select "matches"
> - when you can account for the same variance by using
> covariates of the match-variables. Or propensity score.

There are methods, and good arguments for using them, which use multiple
cases per control.

>
> Pairing makes sense for "left eye versus right eye",
> or for sibs; but hardly ever will it give greater power for
> data-paried subjects, compared to good covarying.

My instincts agree with yours most of the way here, and in particular I
am sceptical about the practice of assuming that the matched pairs are
"effectively" identical (i.e. the fact that one didn't get the treatment
is "ignorable" and tells us nothing about that person), but there is a
very impressive literature that disagrees with you. While appealing to
the authority of figures such as Donald Rubin and James Heckman may be a
rhetorical faux-pas, I think the fact that the literature includes some
very careful thinking about the fundamentals of detecting causality in
observational data, should carry more weight. They have identified
systematic situations in which regression models, even with "good
covarying", will produce biased estimates of causal effects (e.g., if
your population includes cases very unlikely to experience the
treatment, the regression estimates an average population effect which
is different from the effect on those eligible for treatment). Moreover,
they have done some hard thinking about what exactly are "causal
effects", which are well worth engaging with for those of us who are
prone to thinking about the world in terms of regression models.

Mind you, Judea Pearl has thought even harder about causality, and
thinks Rubin et al are a bit wooly-minded. There was a very interesting
series of exchanges between him and Andrew Gelman on the latter's blog
this summer, where a big element of contention was some of the practices
used in generating the propensity score (Pearl rightly pointing out that
you can't just throw *anything* into the the propensity model)

(Google "Pearl site:http://www.stat.columbia.edu/~cook/movabletype" for links)

Brendan

Rich Ulrich

unread,
Oct 31, 2009, 12:51:33 AM10/31/09
to

Okay, I have to agree that I was not giving full weight to the
troubles that can arise from covariation when Populations are
not matched. I'm well aware of many.

However, I do not expect that Heckman would advocate "matching"
as a solution -- if you are implying that. "Throwing away data"
by used only "matched pairs" is not the answer. (Yes, the design
may be considered cost-effecient if the expensive part of data
collection is done after the matching.)

What I read at what I found from your search recommendation,
a summary of the dialogue between Pearl and Rubin, at
http://www.stat.columbia.edu/~cook/movabletype/archives/2009/07/pearls_and_gelm.html

does not mention matching at all.


> Moreover,
>they have done some hard thinking about what exactly are "causal
>effects", which are well worth engaging with for those of us who are
>prone to thinking about the world in terms of regression models.
>
>Mind you, Judea Pearl has thought even harder about causality, and
>thinks Rubin et al are a bit wooly-minded. There was a very interesting
>series of exchanges between him and Andrew Gelman on the latter's blog
>this summer, where a big element of contention was some of the practices
>used in generating the propensity score (Pearl rightly pointing out that
>you can't just throw *anything* into the the propensity model)
>
>(Google "Pearl site:http://www.stat.columbia.edu/~cook/movabletype" for links)

"Gary King" is another citation on ecological inference,
which is relevant.

--
Rich Ulrich

Brendan Halpin

unread,
Oct 31, 2009, 7:46:25 AM10/31/09
to
On Sat, Oct 31 2009, Rich Ulrich wrote:

> However, I do not expect that Heckman would advocate "matching"
> as a solution -- if you are implying that.

He's no short-sighted booster of it but he does consider it extensively
as one means (among others that all improve on linear models with good
control variables) of estimating causal effects using non-experimental
data:

JJ Heckman, H Ichimura, P Todd, Matching as an econometric evaluation
estimator, The Review of Economic Studies, 1998

J Heckman, S Navarro-Lozano
Using matching, instrumental variables, and control functions to
estimate economic choice, Review of Economics and Statistics, 2004

JJ Heckman, H Ichimura, J Smith, P Todd, Sources of selection bias in
evaluating social programs: An interpretation of conventional measures
and evidence on the effectiveness of matching as a program evaluation
method, Proceedings of the National Academy of Sciences of the USA, 1996

0 new messages