Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


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

st: PSMATCH2 with Dichotomous Outcomes


From   Dennis Kramer <dkramerii@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: PSMATCH2 with Dichotomous Outcomes
Date   Thu, 12 May 2011 12:17:16 -0400

Can PSMATCH2 be used with a dichotomous outcome and estimate the
average odds ratio of the treatment? I have used the following syntax
for estimating continuous outcomes and I would like to adapt it a
dichotomous platform.

Any suggestions would be greatly appreciated.

set seed 12345
tempvar sortorder
gen `sortorder' = runiform()
sort `sortorder'

global covar LIST OF COVARIATES FOR MATCHING

label define ALL_BLOCKlabel 1 "Treated - Block"
label define ALL_BLOCKlabel 0 "Untreated - Non-Block", add
label values ALL_BLOCK ALL_BLOCKlabel
label variable ALL_BLOCK "treatment"

logit ALL_BLOCK $covar
predict pscore

histogram pscore, start(0.0) width(0.05) by(ALL_BLOCK, col(1))
xsize(1) ysize(1.1) xtitle("Block vs. Non-Block") note("Pr(Block")
scheme(s 1mono) saving(support,replace)

psmatch2 ALL_BLOCK, outcome ( OUTCOME VARIABLES) pscore(pscore)
neighbor(1) caliper(0.5) common
*
*   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–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index