Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: stcox after psmatch2


From   Michael McCulloch <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: stcox after psmatch2
Date   Fri, 11 May 2012 08:52:03 -0700

Eduardo, I wrote a small Stata do-file for a Cox survival analysis using Inverse-Probability-of-Treatment-Weighting, in a point-estimate design context (not time-varying). If you'd like, I could send you the code. 
Michael McCulloch 

On May 11, 2012, at 8:30 AM, Joerg Luedicke <[email protected]> wrote:

> Eduardo,
> 
> I don't think this advice is very helpful. Why exactly would you want
> to leave Stata for this kind of stuff? Getting propensity scores and
> creating a desired weight (e.g., an ATT weight) is all very easy and
> straightforward in Stata. Moreover, there are lots of options for
> survival analyses or other longitudinal methods. If I miss anything
> here you need to tell us what the R package you mention can do in
> particular that Stata cannot.
> 
> George,
> 
> Several thoughts:
> 
> - For predicting the propensity scores and thus, for the variables you
> want to use for matching, it is important to choose pre-treatment
> variables. If survival times or whatever differ after enrollment/ no
> enrollment then this could possibly regarded as a treatment effect.
> 
> - I am not sure what this -pscore- (which btw is user-written and you
> are asked to state where you got it from) is doing. But as far as I
> understand you, you want to do a 1-1 matching and run some survival
> analyses using the resulting sample and so I doubt that you need that.
> I would just do:
> 
> logit Status age i.gender_coded i.Race_coded i.Hospital_coded
> i.Patient_class_coded i.Asthma i.copd i.dm i.ht i.Stroke i.chd i.hf
> i.Dyslipidaemia i.Obesity if PrimaryFirst1==1
> predict double pscore
> 
> in order to obtain propensity scores.
> 
> WRT: "I used one matched control per treated, I selected paircount=2
> and did stcox regression. Am i doing it the right way?"
> 
> Does not look wrong from what I can see here. However, as always, the
> devil is in the details (e.g., how did you derive your caliper?) and
> there are many options available for what you may want (e.g.,
> different matching methods, propensity score weighting (instead of
> matching), different kinds of treatment effects). Here is an
> introductory textbook on the matter which outlines a lot of the
> different flavors you can get, including hands-on examples:
> 
> Guo S & Fraser MW (2010): Propensity Score Analysis. Thousand Oaks: SAGE.
> 
> HTH,
> 
> J.
> 
> 
> On Fri, May 11, 2012 at 5:26 AM, Eduardo Nunez <[email protected]> wrote:
>> George,
>> You should look at ipw, an R package that estimate a propensity score
>> and use it as inverse probability weighting. The software allows
>> longitudinal data with survival endpoint.
>> Best wishes,
>> Eduardo
>> 
>> 
>> On Fri, May 11, 2012 at 5:35 AM, George Gunapal Pradeep Paul (NHGHQ)
>> <[email protected]> wrote:
>>> 
>>> Thanks Ariel, Steve and Joerg for your suggestions and references. To
>>> clarify more,
>>> 
>>> I am comparing a group of Chronic Obstructive Pulmonary Disease
>>> (COPD)patients enrolled in a disease management program and a control group
>>> selected from a administrative database. There is an enrolment criteria for
>>> enrolling patients into the program, but however not all COPD patients are
>>> enrolled.
>>> 
>>> I sampled control cases from hospital administrative database, i.e. COPD
>>> patients who fulfilled the COPD disease management program's enrolment
>>> criteria but where not enrolled into the program. Now that I have program
>>> patients and controls, I did matching to adjust for the difference in
>>> characteristics on who gets enrolled into the program. For eg. If younger,
>>> more healthier patients are more often enrolled in the COPD disease
>>> management program, then we can expect them to have better outcomes (lower
>>> mortality) than the control group.
>>> 
>>> My hypothesis: No difference is mortality rate (expressed in person years)
>>> between the patients enrolled in a COPD program and controls who were not
>>> enrolled in the program.
>>> 
>>> Other things to consider, multiple records per patient and the follow time
>>> is different between the program patients and controls.
>>> 
>>> 
>>> Steve & Joerg: Since follow up period is different for these two groups,
>>> hence i thought of doing cox regression to adjust for the effect of follow
>>> up time on mortality on the matched program patients and controls. Kindly
>>> let me know your thoughts.
>>> 
>>> Ariel:
>>> I used the following code for generating pscore and matching
>>> 
>>> xi:pscore Status age i.gender_coded i.Race_coded i.Hospital_coded
>>> i.Patient_class_coded i.Asthma i.copd i.dm i.ht i.Stroke i.chd i.hf
>>> i.Dyslipidaemia i.Obesity if PrimaryFirst1==1, pscore(mypscore)
>>> blockid(myblock) comsup
>>> 
>>> xi:psmatch2 Status if PrimaryFirst1==1, pscore(mypscore)
>>> outcome(i.Mortality_resp_system) caliper(.001) noreplace neighbor(1)
>>> 
>>> And after matching, I identified pair count using the following code
>>> gen pair = _id if _treated==0
>>> replace pair = _n1 if _treated==1
>>> bysort pair: egen paircount = count(pair)
>>> 
>>> I used one matched control per treated, I selected paircount=2 and did
>>> stcox regression. Am i doing it the right way?
>>> 
>>> 
>>> Thank you for your time and greatly appreciate your help.
>>> 
>>> Best regards,
>>> Pradeep
>>> 
>>> 
>>> 
>>> -----Original Message-----
>>> From: [email protected]
>>> [mailto:[email protected]] On Behalf Of Ariel Linden,
>>> DrPH
>>> Sent: Thursday, May 10, 2012 11:52 PM
>>> To: [email protected]
>>> Subject: re: st: stcox after psmatch2
>>> 
>>> I am not sure what problem your facing? -psmatch2 (a user written program
>>> found on ssc) will gives you a field called _nn that tells you who the
>>> matched control is. BTW, you didn't give details of which matching approach
>>> you used or how many controls. If you used more than one matched control per
>>> treated, you'll need the _weight variable as well.
>>> 
>>> You then run your stcox model on only those patients and their matched
>>> controls (1:1), and if you have 1:k matches, you also include the _weight in
>>> the model...
>>> 
>>> I hope this helps
>>> 
>>> Ariel
>>> 
>>> Date: Thu, 10 May 2012 05:33:22 +0000
>>> From: "George Gunapal Pradeep Paul (NHGHQ)"
>>> <[email protected]>
>>> Subject: st: stcox after psmatch2
>>> 
>>> Dear all,
>>> I am comparing a group of Chronic Obstructive Pulmonary Disease
>>> (COPD)patients enrolled in a disease management program and a control group.
>>> I calculated pscore and did psmatch2 using c:\ado\plus\p\psmatch2.ado *!
>>> version 4.0.5 18apr2012 E. Leuven, B. Sianesi. I used psmatch2 to adjust
>>> for their baseline differences and now I would like to do a cox regression
>>> on the matched program patients and controls to see if there is a difference
>>> in time to death between the two groups.
>>> 
>>> I would like to know how to run stcox after psmatch2 , thereby identifying
>>> the matching sequence for the cox regression. I tried looking for answers
>>> for this but found only one unanswered relevant question which could be
>>> found at http://www.stata.com/statalist/archive/2009-11/msg00709.html
>>> 
>>> Kindly help.
>>> 
>>> Thank you,
>>> 
>>> Best regards,
>>> Pradeep
>>> 
>>> 
>>> *
>>> *   For searches and help try:
>>> *   http://www.stata.com/help.cgi?search
>>> *   http://www.stata.com/support/statalist/faq
>>> *   http://www.ats.ucla.edu/stat/stata/
>>> 
>>> 
>>> ---------------------------------------------------------------------------------
>>> The information contained in this e-mail and the attachments (if any) may
>>> be privileged and confidential and is intended solely for the named
>>> addressee.  If you are not the intended recipient, please do not print,
>>> retain copy, disseminate, distribute, or use this e-mail or any part
>>> thereof.  Please notify the sender immediately by replying to this e-mail
>>> and delete all copies of this e-mail and the attachments.
>>> 
>>> *
>>> *   For searches and help try:
>>> *   http://www.stata.com/help.cgi?search
>>> *   http://www.stata.com/support/statalist/faq
>>> *   http://www.ats.ucla.edu/stat/stata/
>> 
>> *
>> *   For searches and help try:
>> *   http://www.stata.com/help.cgi?search
>> *   http://www.stata.com/support/statalist/faq
>> *   http://www.ats.ucla.edu/stat/stata/
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/

*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index