ez.zresidize | R Documentation |
residualize variable, returning it changed in-place (i.e under its original column name)
ez.zresidize(data, var, covar, model = "lm", scale = TRUE, ...)
var |
a single var or a vector of var names to regress out covar |
covar |
covariates, one or more than one covar |
model |
'lm', 'lmrob' (MM-type Estimators, robustbase), 'lmRob' (automatically chooses, robust), 'rlm' (MASS) |
scale |
unstandarize or standardize residual |
... |
additional param passed to the specified model |
dataframe with var residualized in place (i.e under its original column name). If covar have NA, then that row for var will be NA.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.