| chemlm | R Documentation |
Regression models for multiple chemical exposures
chemlm(x, ...) ## Default S3 method: chemlm( data, outcome, chem, value = "value", adjust = NULL, confound = NULL, family = "gaussian", type = "filter", mixed = F, id = NULL, weights = NULL, resid = F, corstr1 = "independence" ) ## S3 method for class 'chemlm' print(x) ## S3 method for class 'chemlm' plot(x, scales = "free", ncol = 3, facetchem = F, facetout = F) ## S3 method for class 'chemlm' plot(x, scales = "free", ncol = 3, facetchem = F, facetout = F)
data |
dataset. data should be in "long" format with the chemical names in one column and the values in another |
outcome |
character outcome variable |
chem |
column name for chemical type (string format) |
value |
column name for value (string format) |
adjust |
function to modify chemicals (default is NULL) |
confound |
character vector of confound variables |
family |
regression family (default is linear model) |
type |
whether to filter results for only chem |
mixed |
whether mixed model (random intercept only currently) |
id |
id variable name |
weights |
weights variable name |
resid |
whether to output residuals |
chemlm Run regression model for chemical data
This is a function to run multiple regression models for chemical data, where each model is fitted to a single chemical at a time
data(simchemdat) res <- chemlm(simchemdat, outcome = "out", chem = "chem") print(res) plot(res)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.