model_fit: Model fit for cbenefit

Description Usage Arguments Details Value See Also Examples

Description

Model fit for cbenefit

Usage

1

Arguments

formula

A formula to be evaluated for the model

data

A data frame or the name of the data frame where the formula may be evaluated

model

One of "coxph" for a Cox model or "glm" for logistic regression

...

Further argumnets that are passed on to 'glm' or 'coxph'

Details

The function does not spend time checking its input. In particular, the function has only been tested with complete case data frames, and where the treatment is coded as 0 (control) and 1 (treated).

Value

A model fit of type coxph or glm

See Also

model_fit_glmnet

Examples

1
2
3
4
5
model_fit(Surv(time, status) ~  treat + x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8,
dat_toy, model = "coxph")

model_fit(status ~ treat +  x1 + x2 + x3 + x4 + x5 + x6 + x7 + x8,
          dat_toy, model = "glm")

tbalan/cbenefit documentation built on May 8, 2019, 12:58 p.m.