report.doc This function enables to export the information of the model (the package, the name of the function, the call etc...)

report.modelinfo(object, ...)

# S3 method for lme
report.modelinfo(object, doc = NULL, page.break = TRUE,
  ...)

# S3 method for lmerMod
report.modelinfo(object, doc = NULL,
  page.break = TRUE, ...)

# S3 method for glm
report.modelinfo(object, doc = NULL, page.break = TRUE,
  ...)

# S3 method for coxph
report.modelinfo(object, doc = NULL, page.break = TRUE,
  ...)

Arguments

object

A model (for now glm, lme, lmer and coxph models are availlable)

...

Other arguments

doc

NULL or a rdocx object

page.break

Logical. If TRUE it adds a page break after the output. Default to TRUE

Value

A flextable object (if doc=NULL) or a rdocx object (if doc= an rdocx object).

Details

Compatible only (for now) with GLM, LME and Cox models. For now those output are not numbered.

See also

Examples

library(officer) library(flextable) library(nlme) library(lme4) data(datafake) #Model info for lme model mod=lme(y_numeric~GROUP+TIMEPOINT,random=~1|SUBJID,data=datafake,na.action=na.omit) # Show in HTML (can be inserted in an R markdown or a MS Word document) report.modelinfo(mod)
#> a flextable object. #> col_keys: `Information`, `Details` #> header has 1 row(s) #> body has 8 row(s) #> original dataset sample: #> Information #> 1 R package / function #> 2 Type of model #> 3 Model formula #> 4 Method of adjustment #> 5 NA handling #> Details #> 1 R Package nlme , function lme #> 2 Linear Mixed Effect Model #> 3 lme.formula(fixed = y_numeric ~ GROUP + TIMEPOINT, data = datafake, \n random = ~1 | SUBJID, na.action = na.omit) #> 4 REML #> 5 omit
#Model info for lmer model mod=lmer(y_numeric~GROUP+TIMEPOINT+(1|SUBJID),data=datafake,na.action=na.omit) report.modelinfo(mod)
#> a flextable object. #> col_keys: `Information`, `Details` #> header has 1 row(s) #> body has 7 row(s) #> original dataset sample: #> Information #> 1 R package / function #> 2 Type of model #> 3 Model formula #> 4 Method of adjustment #> 5 Number of Observations #> Details #> 1 R Package lme4 , function lmer #> 2 Linear Mixed Effect Model #> 3 lmer(formula = y_numeric ~ GROUP + TIMEPOINT + (1 | SUBJID), \n data = datafake, na.action = na.omit) #> 4 REML #> 5 386