Weighted Kaplan-Meier curves in survival analysis in SPSS

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Weighted Kaplan-Meier curves in survival analysis in SPSS

Bane Ling
Hi there, I am having some difficulty in finding out how to perform a weighted Kaplan-meier curves. Please see sample data below.

The Group variable indicates whether the individual is from a case (=1) or control (=0), one case can have one or more controls. Everybody gets an event (=1) thus there is no censored data, and the time-to-event is coded in the WaitTime variable. I was able to do a simple Kaplan-Meier curve with 1 case per 3 controls, but I am trying to find out how I can incorporate, like in this scenario, in which a case can have different numbers of control in a weighted K-M curve.

I have tried searching on the net and looked at the program's help file without success in finding the exact procedure. I have tried to used data > weight cases (using the Strata variable) > then perform a Kaplan-Meier curve, but not entirely sure if this is the right method (got a feeling that it is not).

ID Event Grp Strata WaitTime
3 1       1 1        0
567 1       0 1        75
4744 1       0 1        0
5 1       1 2        5
76 1       0 2        0
6797 1       0 2        8
7 1       1 3        12
356 1       0 3        23
23 1       1 4        76
89 1       0 4        15
334 1       0 4        44
790 1       0 4        12
56 1       1 5        9
456 1       0 5        1
65456 1       0 5        18
67 1       1 6        0
85 1       0 6        80
457 1       1 7        1
789 1       0 7        0
866 1       0 7        41
678 1       1 8        8
890 1       0 8        4
5334 1       1 9        0
56768 1       0 9        7
653269 1       0 9        6
Reply | Threaded
Open this post in threaded view
|

Re: Weighted Kaplan-Meier curves in survival analysis in SPSS

David Marso
Administrator
"weight cases (using the Strata variable) "?????????????
<Train Crash Alert>
You really should back out of that and describe what is your point in weighting?
You really don't want to do what you are doing here as far as using Strata as weight.
Why would you want to mathematically replicate some cases 1 others 2,3,4,5,...etc?
Look up WEIGHT in the user reference guide and understand it before misusing it.
I don't know squat about weighted K-M curves but it is obvious you don't want to weight by strata!!!
</Train Crash Alert>
"in which a case can have different numbers of control in a weighted K-M curve."
So outside of SPSS, how do others proceed?  Describe this or supply a publicly available reference.
---
Even though my TAXES pay for A LOT of federally funded RESEARCH, I don't have access to ANY of it because I am a lowly unconnected/unaffiliated  PEON!  There aught to be a law against that!
-
---
Bane Ling wrote
Hi there, I am having some difficulty in finding out how to perform a weighted Kaplan-meier curves. Please see sample data below.

The Group variable indicates whether the individual is from a case (=1) or control (=0), one case can have one or more controls. Everybody gets an event (=1) thus there is no censored data, and the time-to-event is coded in the WaitTime variable. I was able to do a simple Kaplan-Meier curve with 1 case per 3 controls, but I am trying to find out how I can incorporate, like in this scenario, in which a case can have different numbers of control in a weighted K-M curve.

I have tried searching on the net and looked at the program's help file without success in finding the exact procedure. I have tried to used data > weight cases (using the Strata variable) > then perform a Kaplan-Meier curve, but not entirely sure if this is the right method (got a feeling that it is not).

ID Event Grp Strata WaitTime
3 1       1 1        0
567 1       0 1        75
4744 1       0 1        0
5 1       1 2        5
76 1       0 2        0
6797 1       0 2        8
7 1       1 3        12
356 1       0 3        23
23 1       1 4        76
89 1       0 4        15
334 1       0 4        44
790 1       0 4        12
56 1       1 5        9
456 1       0 5        1
65456 1       0 5        18
67 1       1 6        0
85 1       0 6        80
457 1       1 7        1
789 1       0 7        0
866 1       0 7        41
678 1       1 8        8
890 1       0 8        4
5334 1       1 9        0
56768 1       0 9        7
653269 1       0 9        6
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Weighted Kaplan-Meier curves in survival analysis in SPSS

Bane Ling
Thanks for the reply.

Yes, I understand "Weight cases by" shouldn't serve my purpose, as it is based on some kind of prespecified FREQUENCY weight. And plugging the Strata is not the way to do, but I just try to test it out and trying to see how if there is a way to restructure my data to fit the functions available in SPSS, instead of using Strata, in order to generate what I need.

Allow me to explain more about what I am trying to achieve and what are available.

Basically, I am trying to compare cases and controls with respect to the amount of time getting diagnosed. Cases all undergone some program, while controls didn't. The controls are matched with cases with certain variables. As you can imagine, some cases might have no matches, 1 match or more than 1 matches. What I like to do is to let the number of naturally matched controls dictate the weights.

In the end I would like to generate a K-M curve with two lines, one for cases and another for controls.

Now if we look at the sample data (sorry I tried but not able to present it nicely), Case with ID = 3 has two controls (IDs = 567 and 4744) (all are classified as Strata 1) while case with ID = 23 has three controls (IDs = 89, 334, and 790) (all are classified as Strata 4). In a weighted K-M curve, the line representing controls should place different weights on the two controls (for case ID 3) as compared to weights on the three controls (for case ID 23). Can this be done in SPSS or other stats. programs? If so, please let me know. Thanks.
Reply | Threaded
Open this post in threaded view
|

Re: Weighted Kaplan-Meier curves in survival analysis in SPSS

David Marso
Administrator
A quick Google on Weighted Kaplan Meier suggests a class of model *VERY* different than what you are suggesting!  My quick take is the method formally referred to as WKM is REALLY much more akin to WLS than some case weighting (suggestive of your situation).  NOTE KM in SPSS ASSUMES POSITIVE INTEGER WEIGHT!...Don't know about other SW.  Maybe there is an R package.  Why do you feel you need to weight in the first place?  BTW: KM is not one of my special branches of statistical erudition so my question re WHY weight may very well be naive and/or RCI?
---
Bane Ling wrote
Thanks for the reply.

Yes, I understand "Weight cases by" shouldn't serve my purpose, as it is based on some kind of prespecified FREQUENCY weight. And plugging the Strata is not the way to do, but I just try to test it out and trying to see how if there is a way to restructure my data to fit the functions available in SPSS, instead of using Strata, in order to generate what I need.

Allow me to explain more about what I am trying to achieve and what are available.

Basically, I am trying to compare cases and controls with respect to the amount of time getting diagnosed. Cases all undergone some program, while controls didn't. The controls are matched with cases with certain variables. As you can imagine, some cases might have no matches, 1 match or more than 1 matches. What I like to do is to let the number of naturally matched controls dictate the weights.

In the end I would like to generate a K-M curve with two lines, one for cases and another for controls.

Now if we look at the sample data (sorry I tried but not able to present it nicely), Case with ID = 3 has two controls (IDs = 567 and 4744) (all are classified as Strata 1) while case with ID = 23 has three controls (IDs = 89, 334, and 790) (all are classified as Strata 4). In a weighted K-M curve, the line representing controls should place different weights on the two controls (for case ID 3) as compared to weights on the three controls (for case ID 23). Can this be done in SPSS or other stats. programs? If so, please let me know. Thanks.
Please reply to the list and not to my personal email.
Those desiring my consulting or training services please feel free to email me.
---
"Nolite dare sanctum canibus neque mittatis margaritas vestras ante porcos ne forte conculcent eas pedibus suis."
Cum es damnatorum possederunt porcos iens ut salire off sanguinum cliff in abyssum?"
Reply | Threaded
Open this post in threaded view
|

Re: Weighted Kaplan-Meier curves in survival analysis in SPSS

Bane Ling
The reason our group felt there is a need for weight is that, based on our data source limitations, there is bound to have bias in the methods of choosing controls, so we would like to do a kind of sensitivity analysis. So one analysis will simply be having a strictly 1:3 case:control matches in which each of the control should contribute equal weight.

I kind of restruct it a bit and create a weight variable and so for example if the case has 2 controls, each of the control will receive a 1/2 in the weight var, if three controls each will receive a 1/3 weight, but like what you said in the Frequency weight they only accept positive integers, so K-M wasn't produced.
Reply | Threaded
Open this post in threaded view
|

Re: Weighted Kaplan-Meier curves in survival analysis in SPSS

Rich Ulrich
Maybe you have already considered this, but I want to suggest using
Cox regression with two groups, where you ignore the "strata" and,
instead, use the variables that made up the matching as covariates.

Cox  might have more power because it substitutes a parametric test
for a test that aggregates many small sets of ranks. 

Also, it is a common observation that using the matching variables as
covariates is apt to be superior to using paired t-tests (say) for case-control
matches.  For using the matches, you achieve to do both things -- (a) do a
good job of matching; and (b) have a really strong "effect" for some
aspect of the matching.   Using matches "within family"  is sometimes that
strong, or using paired body parts on one person.  Otherwise, using ANCOVA
with the covariates is apt to improve the level of control *and*  increase
the degrees of freedom for the analysis.

--
Rich Ulrich


> Date: Wed, 23 Jan 2013 19:28:36 -0800

> From: [hidden email]
> Subject: Re: Weighted Kaplan-Meier curves in survival analysis in SPSS
> To: [hidden email]
>
> The reason our group felt there is a need for weight is that, based on our
> data source limitations, there is bound to have bias in the methods of
> choosing controls, so we would like to do a kind of sensitivity analysis. So
> one analysis will simply be having a strictly 1:3 case:control matches in
> which each of the control should contribute equal weight.
>
> I kind of restruct it a bit and create a weight variable and so for example
> if the case has 2 controls, each of the control will receive a 1/2 in the
> weight var, if three controls each will receive a 1/3 weight, but like what
> you said in the Frequency weight they only accept positive integers, so K-M
> wasn't produced.
>

...
Reply | Threaded
Open this post in threaded view
|

Re: Weighted Kaplan-Meier curves in survival analysis in SPSS

Bane Ling
A colleague suggested me to use something called the "importance weight" (1 divided by the number of matches) in Stata or R. Can anyone confirm that SPSS can't address Importance weight?