obs_modeling: linear and non-linear (GAM) observational modeling

View source: R/obs_modeling.R

obs_modelingR Documentation

linear and non-linear (GAM) observational modeling

Description

This performs traditional linear and GAM or non-linear modeling

Usage

obs_modeling(
  wdata,
  outcome = NA,
  exposure = NA,
  linear_covariates = NA,
  smooth_covariates = NA,
  rnt_outcome = FALSE,
  weights_variable = NA,
  outlier_method = "iqr",
  outlier_cutoff = 5,
  messages = FALSE
)

Arguments

wdata

a data frame passed to function containing necessary data for analysis

outcome

a single string character of the column name for the outcome or dependent or response variable

exposure

a single string character of the column name for the exposure or independent or explanatory variable

linear_covariates

a vector of string(s) that are also column names used to define variables that will be set as parametric (linear) covariates.

smooth_covariates

a vector of string(s) that are also column names used to define variables that will be set as non-linear (smooth, s()) covariates.

rnt_outcome

binary TRUE or FALSE if the dependent or response variable should be rank normal transformed.

weights_variable

a single string character of the column name for a weights variable

outlier_method

a single string character of "iqr" or "sd" to determine if outlier should be determined by means and sd or medians and iqr.

outlier_cutoff

a single numeric value to define a cutoff value for how many iqr or sd units outlier values

messages

should a progress message be printed to screen - binary TRUE or FALSE

Value

returns a obs_modeling vector of summary statistics

Examples

obs_modeling()

hughesevoanth/glsmr documentation built on May 14, 2023, 3:41 p.m.