This function will estimate the robust effect size (RESI) from Vandekar, Tao, & Blume (2020). The overall RESI is estimated via a Wald test. RESI is (optionally) estimated for each factor in coefficients-style table. RESI is (optionally) estimated for each variable/interaction in an Anova-style table for models with existing Anova methods. This function is the building block for the resi function.
model.full: lm, glm, nls, survreg, coxph, hurdle, zeroinfl, gee, geeglm or lme model object.
...: Ignored.
model.reduced: Fitted model object of same type as model.full. By default NULL; the same model as the full model but only having intercept.
data: Data.frame or object coercible to data.frame of model.full data (required for some model types).
anova: Logical, whether to produce an Anova table with the RESI columns added. By default = TRUE.
coefficients: Logical, whether to produce a coefficients (summary) table with the RESI columns added. By default = TRUE.
overall: Logical, whether to produce an overall Wald test comparing full to reduced model with RESI columns added. By default = TRUE.
vcovfunc: The variance estimator function for constructing the Wald test statistic. By default, sandwich::vcovHC (the robust (sandwich) variance estimator).
Anova.args: List, additional arguments to be passed to Anova function.
vcov.args: List, additional arguments to be passed to vcovfunc.
unbiased: Logical, whether to use the unbiased or alternative T/Z statistic to RESI conversion. By default, TRUE. See details.
waldtype: Numeric, indicates which function to use for overall Wald test. 0 (default) = lmtest::waldtest Chi-square, 1 = lmtest::waldtest F, 2 = aod::wald.test
Returns
Returns a list containing RESI point estimates
Details
The Robust Effect Size Index (RESI) is an effect size measure based on M-estimators. This function is called by resi a specified number of times to form bootstrapped confidence intervals. Called by itself, this function will only calculate point estimates.
The RESI, denoted as S, is applicable across many model types. It is a unitless index and can be easily be compared across models. The RESI can also be converted to Cohen's d (S2d) under model homoskedasticity.
The RESI is related to the non-centrality parameter of the test statistic. The RESI estimate is consistent for all four (Chi-square, F, T, and Z) types of statistics used. The Chi-square and F-based calculations rely on asymptotic theory, so they may be biased in small samples. When possible, the T and Z statistics are used. There are two formulas for both the T and Z statistic conversion. The first (default, unbiased = TRUE) are based on solving the expected value of the T or Z statistic for the RESI. The alternative is based on squaring the T or Z statistic and using the F or Chi-square statistic conversion. Both of these methods are consistent, but the alternative exhibits a notable amount of finite sample bias. The alternative may be appealing because its absolute value will be equal to the RESI based on the F or Chi-square statistic. The RESI based on the Chi-Square and F statistics is always greater than or equal to 0. The type of statistic used is listed with the output. See f2S, chisq2S, t2S, and z2S for more details on the formulas.
For GEE (geeglm) models, a longitudinal RESI (L-RESI) and a cross-sectional, per-measurement RESI (CS-RESI) is estimated. The longitudinal RESI takes the specified clustering into account, while the cross-sectional RESI is estimated using a model where each measurement is its own cluster.
Methods (by class)
resi_pe(default): RESI point estimation
resi_pe(glm): RESI point estimation for generalized linear models
resi_pe(lm): RESI point estimation for linear models
resi_pe(nls): RESI point estimation for nonlinear least squares models
resi_pe(survreg): RESI point estimation for survreg
resi_pe(coxph): RESI point estimation for coxph models
resi_pe(hurdle): RESI point estimation for hurdle models
resi_pe(zeroinfl): RESI point estimation for zeroinfl models
resi_pe(geeglm): RESI point estimation for geeglm object
resi_pe(gee): RESI point estimation for gee object
resi_pe(lme): RESI point estimation for lme object
resi_pe(lmerMod): RESI point estimation for lmerMod object
Examples
# This function produces point estimates for the RESI. The resi function will# provide the same point estimates but adds confidence intervals. See resi for# more detailed examples.## resi_pe for a linear model# fit linear modelmod <- lm(charges ~ region * age + bmi + sex, data = RESI::insurance)# run resi_pe on the modelresi_pe(mod)# if you want to have RESI estimates in the coefficient table that are equal in absolute# value to those in the Anova table (except for those with >1 df and/or included in other# interaction terms), you can specify unbiased = FALSE to use the alternate conversion.resi_pe(mod, unbiased =FALSE)
References
Vandekar S, Tao R, Blume J. A Robust Effect Size Index. Psychometrika. 2020 Mar;85(1):232-246. doi: 10.1007/s11336-020-09698-2.