View source: R/regression_lin.R
regression_lin | R Documentation |
Calculates linear regression models using lm(). Designed to make analysis with multiple predictors / outcomes easy and quick.
regression_lin( .data, .outcomes = NULL, .predictors = NULL, .covariates = NULL, .annotation = NULL, .subset = NULL, .cpus = 1, .sort_by = "outcomes", .std_prd = FALSE, .std_cov = NULL, .summary = FALSE, .interaction = NULL, .imputed_predictors = FALSE, .imputed_outcomes = FALSE, ... )
.data |
A data.frame or .mids object. |
.outcomes |
A character vector containing the outcomes. |
.predictors |
A character vector containing the predictors. |
.covariates |
A character vector containing covariates. |
.annotation |
A matrix or data.frame of format (name, pname, unit, short_pname, comment) that contains pretty names for the used variables. |
.subset |
Can be used to internally subset the data. Use .subset = "variable == 'x'" to subset data. |
.cpus |
Input number of desired cpus to use. Useful only in case of big datasets and multiple outcomes/predictors. |
.sort_by |
A character string that indicates either to sort the analyses by "outcomes" or by "predictors". |
.std_prd |
If TRUE, predictors are standardized. |
.std_cov |
Character vector of covariates that should be standardized. |
.summary |
If TRUE, an additional summary of all analyses is returned. |
.interaction |
Can be used to specify interactions using a list of character vectors containing the interaction variables, e.g. list(c("variable1", "variable2"), c("variable2", "variable3")). |
.imputed_predictors |
If TRUE, cases with imputed predictors are used. |
.imputed_outcomes |
If TRUE, cases with imputed outcomes are used. |
... |
Optional input passed directly to the regression function. |
A list containing individual results tables for each regression analysis.
-
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.