Learn R Programming

cem (version 1.1.31)

cemspace: Exploration tool for CEM

Description

Exploration tool for CEM

Usage

cemspace(treatment=NULL, data = NULL, R=100, grouping = NULL, drop=NULL,
L1.breaks = NULL, L1.grouping=NULL, plot = TRUE, fixed = NULL, 
minimal = 1, maximal = 5, M=250, raw.profile=NULL, keep.weights=FALSE,
verbose=1)

Value

val

an invisible object of class imbalance.space.

Arguments

treatment

character, name of the treatment variable.

data

a data.frame.

verbose

integer, controls output.

R

number of possible random coarsening for the CEM.

grouping

named list, each element of which is a list of groupings for a single categorical variable. For more details see cem.

drop

a vector of variable names in the data frame to ignore during matching

L1.breaks

list of cutpoints for the calculation of the L1 measure.

L1.grouping

as grouping but only needed in the calculation of the L1 measure not in matching.

plot

plot the space of solutions?

fixed

vector of variable names which will not be relaxed.

minimal

the minimal number of intervals acceptable after relaxation. Should be a nameed list of positive integers or if a number, this is applied to all variables.

maximal

the maximal number of intervals acceptable after relaxation. Should be a nameed list of positive integers or if a number, this is applied to all variables.

M

number of possible random coarsening for the L1 measure

raw.profile

an object of class L1profile. If passed, the L1.breaks are ignored and set to median cutpoints of L1 profile.

keep.weights

if TRUE, for each matching solutions the CEM-weights are stored.

Author

Stefano Iacus, Gary King, and Giuseppe Porro

Details

This is a tool to help the user to explore different cem solutions by choosing random coarsenings. The algorithm tries R random choiches of coarsenings into intervals between minimal and maximal for numerical, integer or ordered factors. It drops or include dichotomous or boolean variables.

Calling directly plot on the output of cemspace has the same effect of calling directly imbspace.plot.

If you want to relax a given cem solution, use the function imbspace instead.

References

Iacus, King, Porro (2011) tools:::Rd_expr_doi("10.1198/jasa.2011.tm09599")

Iacus, King, Porro (2012) tools:::Rd_expr_doi("10.1093/pan/mpr013")

Iacus, King, Porro (2019) tools:::Rd_expr_doi("10.1017/pan.2018.29")

See Also

imbspace.plot, cemspace

Examples

Run this code
# \donttest{
data(LL)
set.seed(123)
tmp <- cemspace("treated", LL, drop="re78", M=50)
# }

Run the code above in your browser using DataLab