iterativeModel: Iteratively evaluate model for different variables

View source: R/utils.R

iterativeModelR Documentation

Iteratively evaluate model for different variables

Description

Information about variable statistic from each model is extracted using tidy function.

Usage

iterativeModel(object, placeholder, variables, exponentiate = FALSE)

Arguments

object

An existing fit from a model function such as lm, glm and many others.

placeholder

String specifying term to substitute with value from x. Ignored if set to NULL.

variables

Character vector specifying variables to use in association tests.

exponentiate

Logical flag indicating whether or not to exponentiate the coefficient estimates. Internally this is passed to tidy. This is typical for logistic and multinomial regressions, but a bad idea if there is no log or logit link. Defaults to FALSE.

Value

Tibble containing per variable summarised model statistics. The exact output format is model dependent and controlled by model's dedicated tidy function.


Genentech/MiDAS documentation built on Feb. 5, 2024, 11:52 a.m.