sca_lm | R Documentation |
sca_lm is used to run specification curve analysis using linear regression. Fits every possible model for your specified dependent variable, predictor variables, and covariates
sca_lm(data, dv, ivs, covariates = NULL)
data |
dataframe |
dv |
dependent variable (outcome variable) (character) |
ivs |
independent variable(s) or predictor(s) (character) |
covariates |
covariates (character) |
Details to follow
A tibble/data.table with results
Hause Lin
References to follow
# model with 1 covariate m1 <- sca_lm(data = mtcars, dv = "mpg", ivs = c("cyl", "carb"), covariates = c("vs")) m1[, c("modelformula", "term", "estimate", "p.value")] # model, term, beta, p value # model without covariates m2 <- sca_lm(data = mtcars, dv = "mpg", ivs = c("cyl", "gear")) m2[, c("modelformula", "term", "estimate", "es.r")] # es.r is effect size
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.