Fit models over each of a set of independent variables with a response variable
Fit and summarize models for each independent (x) variable with a response variable (y), with options to adjust by variables for each model.
modelsum( formula, family = "gaussian", data, adjust = NULL, na.action = NULL, subset = NULL, weights = NULL, id, strata, control = NULL, ... )
formula |
an object of class |
family |
similar mechanism to |
data |
an optional data.frame, list or environment (or object coercible by |
adjust |
an object of class |
na.action |
a function which indicates what should happen when the data contain |
subset |
an optional vector specifying a subset of observations (rows of |
weights |
an optional vector specifying the weights to apply to each data observation (rows of |
id |
A vector to identify clusters. Only used for |
strata |
a vector of strata to separate model summaries by an additional group. Note that for families like "clog",
the "usual" strata term to indicate subject groupings should be given in the |
control |
control parameters to handle optional settings within |
... |
additional arguments to be passed to internal |
An object with class c("modelsum", "arsenal_table")
Jason Sinnwell, Patrick Votruba, Beth Atkinson, Gregory Dougherty, and Ethan Heinzen, adapted from SAS Macro of the same name
data(mockstudy) tab1 <- modelsum(bmi ~ sex + age, data = mockstudy) summary(tab1, text = TRUE) tab2 <- modelsum(alk.phos ~ arm + ps + hgb, adjust = ~ age + sex, family = "gaussian", data = mockstudy) summary(tab2, text = TRUE) summary(tab2, show.intercept = FALSE, text = TRUE) tab2.df <- as.data.frame(tab2) tab2.df[1:5,]
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.