SPSnbins {USPS}R Documentation

Change the Number of Bins in Supervised Propensiy Scoring

Description

Change the Number of Bins in Supervised Propensiy Scoring

Usage

dframe2 <- SPSnbins(dframe1, prnk, qbin, bins=8)

Arguments

dframe1 Name of data.frame of the form output by SPSlogit().
prnk Name of PS tied-rank variable from previous call to SPSlogit().
qbin Name of variable to contain the re-assigned bin number for each patient.
bins Number of PS bins desired.

Details

Part or all of the first phase of Supervised Propensity Scoring will need to be redone if SPSbalan() detects dependence of within-bin X-covariate distributions upon treatment choice. Use SPSnbins() to change (increase) the number of adjacent PS bins. If this does not achieve balance, invoke SPSlogit() again to modify the form of your PS logistic model, typically by adding interaction and/or curvature terms in continuous X-covariates.

Value

An output data.frame with new variables inserted:

dframe2 Modified version of the data.frame specified as the first argument to SPSnbins().

Author(s)

Bob Obenchain <wizbob@att.net>

References

Cochran WG. (1968) The effectiveness of adjustment by subclassification in removing bias in observational studies. Biometrics 24: 205-213.

Obenchain RL. (2009) USPSinR.pdf ../R_HOME/library/USPS 40 pages.

Rosenbaum PR, Rubin DB. (1984) Reducing Bias in Observational Studies Using Subclassification on a Propensity Score. J Amer Stat Assoc 79: 516-524.

See Also

SPSlogit, SPSbalan and SPSoutco.

Examples

  data(lindner)
  PStreat <- abcix~stent+height+female+diabetic+acutemi+ejecfrac+ves1proc
  logtSPS <- SPSlogit(lindner, PStreat, PSfit, PSrnk, PSbin, appn="lindSPS")
  logtSPS

  # If imbalance within the SPSlogit() default of bins=5 was detected, then ...

  lindSPS <- SPSnbins(lindSPS, PSrnk, PSbin6, bins=6)
  table(lindSPS$PSbin,lindSPS$PSbin6)

[Package USPS version 1.2-0 Index]