Bookmark and Share

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

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

Re: st: Standardized difference of means after PS matching

From   Steve Samuels <>
Subject   Re: st: Standardized difference of means after PS matching
Date   Fri, 31 Aug 2012 23:02:59 -0500

Adam Olszewski <>:

Your posts give no information that would help anyone to solve your problem. When asked for details, you gave code fragments and made-up numbers. (They are also impossible numbers, as the the SDM's produced by -pblachk- for an xi'd binary variable are of the form -a, +a.)

The FAQ state (3.3):

"Say exactly what you typed and exactly what Stata typed (or did) in response. N.B. exactly! If you can, reproduce the error with one of Stata's provided datasets or a simple concocted dataset that you include in your posting."

Show everything. It will be especially important to see the results of -psmatch2- . You can use any publicly available data set. Also, reduce the number of variables in the -psmatch2- statement to the minimum necessary to observe the problem.

I've never used -psmatch2- before, but I've made a brief attempt to replicate your problem, and can't.

sysuse auto, clear
gen high = mpg>21 //dichotomize mpg
set seed 73128
gen u =runiform()
sort u
tempfile t1
save `t1'
/* continuous version of -high- */
psmatch2 foreign high turn price , radius caliper(.2)
xi: pbalchk foreign i.high, wt(_weight)

use `t1', clear
/* xi'd version of -high- */
xi: psmatch2 foreign i.high turn price , radius caliper(.2)
xi: pbalchk foreign i.high, wt(_weight)


> On Aug 29 2012 17:25:50 -0400, Adam Olszewski wrote:
> Subject: Re: st: Standardized difference of means after PS matching
> Hi Ariel,
> Thanks for the email. I'll try to clarify:
> I run something like:
> . psmatch2 treat age sex i.race ..., (I use radius matching BTW)
> . xi: pbalchk treat age i.race ...., weight(_weight)
> and get output of the kind:
> 1.race            SDM 0.21
> 2.race            SDM 0.18   (I'm making the numbers up but this is the
> range)
> Then I try to run:
> .psmatch2 treat age sex race ...,   (which treats "race" as a
> continuous rather than factor variable)
> .xi: pbalchk treat age i.race,  weight(_weight)
> and get:
> 1.race           SDM 0.05
> 2.race           SDM 0.06
> The change between "i.race" and "race" in the psmatch2 model is the
> only change I made (I think I initially did it by mistake actually),
> and was surprised to see the difference.
> I tend not to use -pstest- or other tests that use sample-size
> dependent p-values, following PC Austin recommendation. Though perhaps
> I should take a look if -pstest- would report any change in bias
> reduction.
> On Wed, Aug 29, 2012 at 5:12 PM, Ariel Linden. DrPH
> <> wrote:
> Hi Adam,
> It is not clear to me what step in your process is giving you different
> results? In which program are you using c.race vs i.race? I am not sure
> -pbalchk- (user written program by Mark Lunt) accepts the prefix -c.- and
> furthermore, I don't understand why you'd treat a multiple categorical
> variable (such as race) as continuous to begin with? You'd certainly end
> with a result that would be meaningless.
> As far as calculating balance on a binary variable (assuming it is
> your results should not differ much (between treating the variable as
> continuous and eliciting a proportion, or treating it as a count and using
> chi2) if you have sufficient sample sizes (see what happens when you
> chi2 with t-test for proportions)... However, if you have a multiple
> categorical variable, then I believe you'd need to create dummies for use
> -pbalchk-
> In any case, I can't really provide more guidance, since I not sure
> what is going on given the limited information you provided.
> Ariel

*   For searches and help try:

Attachment: pm26.log
Description: Binary data

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