Description Usage Arguments Details Value Author(s) Examples
Matching based on the estimated propensity score
1 2 3 4 5 6 7 |
object |
an object of class 'pscore' or a data frame. |
object.control |
a data frame. It is needed if |
matched.by |
an integer or a string indicating the matching variable. The default is NULL, i.e. if the class of the input object is 'pscore', object value 'pscore' is automatically used. |
control.matched.by |
an integer or a string indicating the
matching variable in |
who.treated |
an integer or a string indicating which value of
|
treat |
an integer or a string indicating the treatment variable
in data both of |
name.match.index |
a string indicating the name of the variable containing the matching indices. |
ratio |
an integer k indicating the matching ratio 1:k. |
caliper |
an integer or a string indicating the maximum width of
the caliper for which matching should be done. The default is
'logit', i.e. the maximum width of the caliper is |
x |
a numeric value indicating the scale parameter for the
calculation of the caliper if |
givenTmatchingC |
a logical value indicating who is matched to whom. The default is 'TRUE', i.e. untreated observations are matched to treated observations. |
bestmatch.first |
a logical value indicating how potential matching partners are matched. The default is 'TRUE', i.e. observations are matched with the best accordance regarding the matching variable. Otherwise, matching partners are randomly assigned from the pool of potential matching candidates. |
setseed |
an integer setting a random number for the matching process. |
combine.output |
a logical value. The default is 'TRUE', i.e. if
|
Matching by the estimated propensity score creates matching sets in which treated and untreated observations have identical or similar estimated propensity score. One or more untreated observations will be matched to each treated observation or vice versa.
The caliper, i.e. the maximum distance between the estimated
propensity scores of treated and untreated observations to be matched
is generally defined as x
=0.2 of the standard deviation of the
(caliper
)=logit of the estimated propensity score.
If function pscore()
is previously used with default settings,
matched.by
has not to be specified. It is needed, if the
matching variable in data is not labeled by 'pscore'. Also
treat
has not to be specified, contrary to the case where one
or two data frames are given as input objects.
ps.match()
returns an object of class 'matched.pscore',
'matched.data.frame' or 'matched.data.frames' depending on the
class(es) of the input object(s) and combine.output
. If the
class of the input object is 'pscore', the output object inherits all
components from the input object. The following components are
available:
data |
a data frame containing the input data, extended by
column(s) including the matching indices labeled by
|
data.matched |
a data frame limiting 'data' only to matched observations. |
matched.by |
a string indicating the name of the matching variable. |
name.match.index |
a string indicating the name of matching indices generated at last. |
match.index |
a numeric vector containing the matching indices
labeled by 'name.match.index' whereas '0' indicates 'no matching
partner found'. If |
match.parameters |
a list of matching parameters ( |
formula.pscore |
a formula describing formally the propensity
score model fitted at last in |
model.pscore |
an object of class |
name.pscore |
a string indicating the name of propensity score
estimated at last in |
pscore |
a numeric vector containing the estimated propensity score
labeled by |
name.treat |
a string indicating the name of the selected treatment variable. |
treat |
a numeric vector containing the treatment index labeled
by |
Susanne Stampf susanne.stampf@usb.ch
1 2 3 4 5 6 7 8 9 10 |
Loading required package: lme4
Loading required package: Matrix
Argument 'givenTmatchingC'=FALSE: Treated elements were matched to each untreated element.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.