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: Matched ID in Kernel Matching (PSMATCH2)
From
Austin Nichols <[email protected]>
To
[email protected]
Subject
Re: st: Matched ID in Kernel Matching (PSMATCH2)
Date
Wed, 29 Sep 2010 00:42:35 -0400
Santosh Kumar <[email protected]>
I see one obvious typo:
g w=cond(improved,`m'/(-`m'),pscore/(1-pscore))
should be
g w=cond(improved,`m'/(1-`m'),pscore/(1-pscore))
as the weights are based on odds, and m over -m is just -1.
On Tue, Sep 28, 2010 at 4:09 PM, Santosh Kumar <[email protected]> wrote:
> Dear Austin,
>
> I followed your syntax for weighting and then ran OLS. But why does it
> drop the treatment variable, that is "improved" in my regression. Are
> "t" and "w" collinear?
>
> Thanks for your inputs.
> Santosh
>
> su improved, mean
>
> . loc m=r(mean)
>
> . la var pscore "Estimated Propensity Score"
>
> . g w=cond(improved, `m'/(-`m'),pscore/(1-pscore))
> (1876 missing values generated)
>
> . xi: reg diarr improved piped m_age h_age m_yrsch h_yrsch pucca
> hindu muslim dsc dst dobc i.state i.vmonth awadi bpl elec [pw=w]
> i.state _Istate_1-34 (naturally coded; _Istate_1 omitted)
> i.vmonth _Ivmonth_1-12 (naturally coded; _Ivmonth_1 omitted)
> (sum of wgt is 7.2979e+06)
> note: improved omitted because of collinearity
>
> Linear regression Number of obs = 159136
> F( 52,159083) = 80.28
> Prob > F = 0.0000
> R-squared = 0.5534
> Root MSE = .21132
>
> ------------------------------------------------------------------------------
> | Robust
> diarr | Coef. Std. Err. t P>|t| [95% Conf. Interval]
> -------------+----------------------------------------------------------------
> improved | (omitted)
> piped | -.2922823 .1117145 -2.62 0.009 -.5112403 -.0733243
> m_age | -.0122199 .002744 -4.45 0.000 -.0175981 -.0068417
> h_age | -.0012004 .0029404 -0.41 0.683 -.0069635 .0045628
> m_yrsch | .0006469 .0011709 0.55 0.581 -.0016482 .0029419
> h_yrsch | .0015974 .0024514 0.65 0.515 -.0032072 .0064021
> pucca | .0967932 .0224104 4.32 0.000 .0528692 .1407171
> hindu | -.126827 .0434699 -2.92 0.004 -.2120271 -.041627
>
> On Fri, Sep 24, 2010 at 1:02 PM, Austin Nichols <[email protected]> wrote:
>> Santosh Kumar <[email protected]>:
>>
>> Your -psmatch2- syntax is suspect, since you are not regressing a
>> treatment indicator on controls. That said...
>> Why not reweight instead of match?
>>
>> la var t "Treatment"
>> su t, mean
>> loc m=r(mean)
>> la var pvar "Estimated Propensity Score"
>> g w=cond(t,`m'/(`-`m'),pvar/(1-pvar))
>> la var w "ATT weight"
>> logit y t x* [pw=w]
>>
>> Have you tried rerunning -psmatch2- multiple times to see if you get
>> the same estimate every time? My guess is that your estimate depends
>> on the sort order of your data, which is an odd feature for any
>> estimator.
>>
>>
>> On Thu, Sep 23, 2010 at 12:38 PM, Santosh Kumar <[email protected]> wrote:
>>> Dear listserv,
>>>
>>> I want to use propensity score matching to match the treated with the
>>> control. I am using Kernel matching. Instead of getting ATT, I want to
>>> run a logistic regression on the matched sample. I am struggling to
>>> create a matched sample in kernel matching. In nearest neighbor
>>> matching, follwoing syntax will created a matched sample.
>>>
>>> psmatch2 xvar, pscore(pvar) outcome(yvar) caliper(.001) noreplace
>>> neighbor(1)
>>> gen pair = _id if _treated==0
>>> replace pair = _n1 if _treated==1
>>> bysort pair: egen paircount = count(pair)
>>> drop if paircount !=2
>>> save paired, replace
>>>
>>> Could anyone help me in creating a matched sample with Kernel Matching?
*
* 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/