univariate_screen: univariate_screen

Description Usage Arguments Value

View source: R/univariate_screen.r

Description

Run univariate models on all observations variables with respect to response. Asseses p-value of model given LRT or Wald test. Returns all models or just models more significant than the given threshold: thresh.

Usage

1
2
3
univariate_screen(df, observations, response, family = "gaussian",
  model = glm, interactions = FALSE, test = "LRT", thresh = 0.2,
  only_return_selected = FALSE, context_var = NULL)

Arguments

df,

a data.frame containing response and observations variables. Factors with more than 2 levels have only been implimented for test='LRT'

observations,

a character vector of the names of independent/observations variables in df

response,

a character vector of the names of dependent/response variables in df

family,

a character string indicating the family associated with the submitted model c('gaussian','binomial','poisson'...)

model,

a model associated for testing the variables c(glm,lm)

interactions,

a boolean indicating if interactions should be assessed. Default is False.

test,

a character string indicating Likelihood Ratio Test ('LRT') testing likelihood improvement of a model or Wald test ('Wald') testing coefficient > 0

thresh,

a numeric value indicating the p-value cutoff for the univariate screening

only_return_selected,

a boolean value. If true, only models with p-value less than the threshold will be returned. Otherwise, all models will be returned.

context_var,

a character vector of variable(s) necessary for contextual assessment (e.g. age or time)

Value

a list of univariate models, attr(,'Pr') houses the significance of each model


LewisLabUCSD/RegressionModelPipeline documentation built on Jan. 11, 2021, 10:33 p.m.