blanket_stats {BlanketStatsments}R Documentation

Run multiple slightly different models of same type

Description

Run the same model (type, outcome, and covariates) with different sets of predictors

Usage

blanket_stats(
  df,
  outcome,
  predictor_sets,
  covariates = c(),
  modality = "linear",
  event_censor = NA,
  verbose = FALSE
)

Arguments

df

data.frame containing the data set.

outcome

character designating the column with the outcome of interest

predictor_sets

named list or character vectors containing columns with predictors

covariates

vector of characters denoting columns with covariables

modality

character denoting model type. Currently limited to 'linear', 'logistic', and 'cox'

event_censor

character denoting column with censor event. For coxph models only

verbose

logical. TRUE activates printout messages.

Value

named list of models

Author(s)

J. Peter Marquardt

Examples

data <- survival::lung
outcome <- 'time'
predictor_sets <- list('age' = c('age'),'age_ecog' = c('age', 'ph.ecog'))
covariates = c('sex')
modality <- 'cox'
event_censor <- 'status'
bl_stats <- blanket_stats(data, outcome, predictor_sets, covariates, modality, event_censor)


[Package BlanketStatsments version 0.1.2 Index]