.fit_uni_model | R Documentation |
Fits a regression model based on the selected approach. Can handle a single exposure or a vector of exposures.
.fit_uni_model(data, outcome, exposures, approach)
data |
A 'data.frame' with complete observations for outcome and exposures. |
outcome |
A string. Name of the outcome variable. |
exposures |
A string or character vector of predictor(s). |
approach |
A string specifying the regression approach. One of '"logit"', '"log-binomial"', '"poisson"', '"linear"', '"robpoisson"', or '"negbin"'. |
A fitted model object ('glm', 'lm', 'riskratio', or 'negbin') or 'NULL' if fitting fails.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.