[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
RE: st: inverse probability of treatment weights
Many thanks to both: the results are exactly the same in more than 95% of the cases, and their ratio is between .99999952 and .99999994 in the remaining ones. All ipw>1, while I expected some of them to be = 1. Remember that my data are panel and that my treatment variable is like "being married" in a world where no death/divorce is observable. Therefore e.g.
id=1 t=1 : single (treatment=0)
id=1 t=2 : marriage (treatment=1)
id=1 t=3 : still married (treatment=1)
id=1 t=n : still married (treatment=1)
Is it ok to have ipw > 1 for all n observations pertaining to id number 1, or should I manually correct it to 1 for the "still married" observations?
What do you think about using some -st- command in lieu of the logit? When I was younger, I have been told that -st- are continuous time models, while logit is for discrete time ones. But then, I found several empirical papers using survival analysis with time-varying covariates measured once a year, as in my dataset. Is the choice between the two commands just a matter of taste??
At 02.33 29/03/2007 -0400, you wrote:
>The following code might be a bit more numerically stable:
>logit treat $xvars
>predict xb, xb
>replace ipw=1/invlogit(xb) if treat==1
>replace ipw=1/invlogit(-xb) if treat==0
>Hope this helps,
>Maarten L. Buis
>Department of Social Research Methodology
>Vrije Universiteit Amsterdam
>1081 HV Amsterdam
>Buitenveldertselaan 3 (Metropolitan), room Z434
>+31 20 5986715
>- -----Original Message-----
>From: firstname.lastname@example.org [mailto:email@example.com]On Behalf Of sebastian baumeister
>Sent: woensdag 28 maart 2007 17:22
>Subject: Re: st: inverse probability of treatment weights
>i can answer the first part of your question regarding the compuation
>of inverse probability weights after probit/ logit:
>logit treat $xvars
>predict pi, p
>replace ipw=1/pi if treat==1
>replace ipw=1/(1-pi) if treat==0
>the use them as pweights
>> I heard of inverse probability of treatment weights (IPTW) and would like to know if I am implementing them correctly on Stata (my data are PANEL).
>> I estimated the probability of being treated:
>> . logit treat y(t-1) exog
>> . predict iptw
>> Then I used them as (importance??) weights:
>> . ivreg2 y (z1 z2 endog y(t-1) = exog) [iw=iptw]
>> where y is a count variable, y(t-1) is past y (I am uncertain about using lagged y or a depreciated stock up to t-1; in the weighted equation, alternatively, I can use a "years-since treatment" time counter), z1 and z2 are proportions (endogenous; my key independent variables), endog are additional endogenous dummies, exog are exogenous, treat is the treatment dummy.
>> The problem (?) is that the treatment happens no more than once during the period of observation. To put it differently: before the treatment, we are in regime 1: all endogenous are zero; after the treatment, we are in regime 2: z1>0 (other endogenous may or may not be zero). Change from regime 2 to 1 not possible. Thus, iptw = 1 for all t after the treatment, since I'm interested in y over the whole time period - before and after the treatment. Is it ok? Alternatively, is there any IV command with an inflated/hurdle/heckman regression in the first step?
>> P.S. I have far more endogenous variables than exogenous: can I use time dummies and L2.y as instrustruments?
* For searches and help try: