fit.adj.lm: Fit LM with Adjusted Treatment Effect

Description Usage Arguments Value

View source: R/adjtreat.R

Description

This function fits a linear model with a given treatment effect. For that, it pre processes the data with the given effect and returns the fitted linear model. An unadjusted linear model can be generated with setting 'effects' to 'NA'.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
fit.adj.lm(
  data,
  outcome,
  exposure,
  variables,
  id,
  time_col,
  effects = NA,
  one.hot = FALSE
)

Arguments

data

Data Frame with patient data

outcome

name of the outcome variable column

exposure

name of the exposure variable column

variables

vector of names of other variables

effects

list of effects for

one.hot

boolean weather the exporure variable is on hot encoded or not-

Value

fitted linear model


thogaertner/cinof1 documentation built on Jan. 8, 2022, 10:37 a.m.