autoSelectSubset: Autoselect Subset for Aggregated Effects
Description
Automatically selects a subset of the original dataset for computing specific
aggregated effects. The subset is selected such that it is as close as possible
to the user supplied newdata frame. The function uses exact matching for
categorical covariates (and the treatment if specified) and matching based
on the Mahalanobis distance for continuous covariates.
Usage
autoSelectSubset(obj, newdata, nsub = 10)
Value
Vector of integers indicating the rows to use for computing the aggregated
effects. Can directly be used in computeAggregatedEffects
Arguments
obj
Object of class effectlite.
newdata
A data.frame with a single row, containing the same continuous and
categorical covariates (and potentially the treatment variable) as used when fitting the
EffectLiteR model in obj.
nsub
Integer. How many data points should be used for matching
the continous covariates. Will be ignored if no values for continuous covariates
are specified.