{smcl}
{hline}
help for {hi:propwt}
{hline}

{title:Generating Weights for Propensity Analysis}

{p 4 8 2}
{cmdab:propwt}
{it:treatvar}
{it:propvar}
[{cmd:if} {it:exp}]
[{cmd:in} {it:range}]
[{cmd:,}
  {opt ipt}
  {opt smr}
  {opt att}
  {opt atc}
  {opt alt}
  {opt gen(suffix)}
  {opt nosc:aled}
]

{title:Description}

{pstd}
The command {cmd:propwt} produces one or more sets of weights to use
in analysing data with propensity scores. The each subject's treatment
status is given in {it:treatvar}: 0=untreated, 1=treated, and the
propensity score is given in {it:propvar}.

{title:Options}

{phang}
{opt ipt} The option {opt ipt} states that you wish to calculate Inverse
Probability of Treatment Weights (IPTW), i.e. setting the distribution
of covariates to be equal to that of the population (Robins et al 2000). 
This is the default, and only needs to be specified if you wish to calculate 
one of the other types of weights available in addition to the IPT weight.

{phang}
{opt att} The option {opt att} allows you to calculate
Average Treatment effect on the Treated (ATT) weights, i.e. setting the 
distribution of covariates to be equal to that of the treated
subjects.

{phang}
{opt smr} The ATT is also referred to as Standardized Mortality Ratio (SMR) 
by Sato & Matsuyama (2003): the option {opt smr} is provided as a
synonym for {opt att}. 

{phang}
{opt atc} The option {opt atc} allows you to calculate
Average Treatment effect on the Controls (ATC) weights, i.e. setting 
the distribution of covariates to be equal to that of the control group. 

{phang}
{opt alt} The option {opt alt} provides an alternative to the IPTW for 
calculating the Average Treatment Effect (ATE) weights, i.e. setting the 
distribution of covariates to be equal to that of the population - using the 
weighting method proposed by Austin Nichols (2008).

{phang}
{opt gen(suffix)} By default, {cmd:propwt} produces variables called
{cmd:ipt_wt} and {cmd:smr_wt}. The option {opt gen(suffix)} will change
the suffix {cmd:_wt} to {it:suffix}.

{phang}
{opt nosc:aled} By default, the weights are standardised by the marginal
probability of treatment, which are referred to as "stabilized
weights" by Robins et al (2000). Unstandardised weights can be
generated by the option {cmd:noscaled}. 

{title:Remarks}

{p 4 8 2}

The weights can be generated manually as follows:

gen ipt = cond(treatvar, 1/propvar, 1/(1-propvar))

gen att = cond(treatvar, 1, propvar/(1- propvar))

gen atc = cond(treatvar, (1-propvar)/propvar, 1)

gen alt = cond(treatvar, (1-propvar), propvar)


{title:References}

{phang}
James M. Robins, Miguel Angel Hern{c a'}n and Babette Brumback.
{it:Marginal Structural Models and Causal Inference in Epidemiology.}
Epidemiology (2000), vol 11 number 5, pp 550-560.

{phang}
Tosiya Sato and Yutake Matsuyama.
{it:Marginal Structural Models as a Tool for Standardization.}
Epidemiology (2003), vol 14 number 6, pp 680-686.

{phang}
Austin Nichols. {it:Erratum and discussion of propensity-score reweighting.} Stata Journal (2008), vol 8 number 4, pp 532-539.

{title:Authors}

{p 4 4 2}
Mark Lunt, Arthritis Research UK Epidemiology Unit,
The University of Manchester

{p 4 4 2}
Ariel Linden, Linden Consulting Group

{p 4 4 2}
Please email:
{browse "mailto:mark.lunt@manchester.ac.uk":mark.lunt@manchester.ac.uk}
or
{browse "mailto:alinden@lindenconsulting.org":alinden@lindenconsulting.org} 
if you encounter problems with {cmd:propwt}


