Description Usage Arguments Details Author(s) References See Also Examples

Function to calculate Rosenbaum bounds for continuous or
ordinal outcomes based on Wilcoxon sign rank test *p*-value when
there are multiple matched control units.

1 2 |

`y` |
Vector of grouped matched outcomes. |

`treat.id` |
A vector indicating the treated unit in each matched group. |

`grp.id` |
A vector indicating matched groups. |

`group.size` |
The size of the matched groups. Three for one treated unit and two control units. |

`Gamma` |
Upper-bound on gamma parameter. |

`GammaInc` |
To set increments for gamma parameter. |

The matched data needs to be in a very particular form for this function to work. The data must be sorted by matched groups with indicators for each matched group and for treated and control units. The simplest way to prepare the data is to use the Match() function and use the data.prep() function to format the data.

Currently this function only takes matched data with 2 or 3 controls units matched to each treated unit.

This function does cannot handle data where the number of control units is not the same for every treated unit.

Luke Keele, Penn State University, ljk20@psu.edu

Rosenbaum, Paul R. (2002) *Observational Studies*.
Springer-Verlag.

See also `data.prep`

, `binarysens`

,
`psens`

, `Match`

,
`hlsens`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 | ```
# Load Matching Software and Data
library(Matching)
data(lalonde)
# Estimate Propensity Score
DWglm <- glm(treat~age + I(age^2) + educ + I(educ^2) + black + hisp +
married + nodegr + re74 + I(re74^2) + re75 + I(re75^2) +
u74 + u75, family=binomial, data=lalonde)
# Save data objects
Y <- lalonde$re78 # the outcome of interest
Tr <- lalonde$treat # the treatment of interest
# Match - without replacement
mDW <- Match(Y=Y, Tr=Tr, X=DWglm$fitted, M=2, replace=FALSE)
# One should check balance, but let's skip that step for now.
# Create Data Object:
tmp <- data.prep(mDW, group.size=3)
# Sensitivity Test
mcontrol(tmp$Y, tmp$id, tmp$treat, group.size=3)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.