report.modelinfo: Export model information (still experimental)

Description Usage Arguments Details Value See Also Examples

View source: R/report.modelinfo.R

Description

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

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
report.modelinfo(object, ...)

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

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

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

## S3 method for class '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

Details

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

Value

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

See Also

report.doc

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
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)

#Model info for lmer model

mod=lmer(y_numeric~GROUP+TIMEPOINT+(1|SUBJID),data=datafake,na.action=na.omit)

report.modelinfo(mod)

ClinReport documentation built on Sept. 3, 2019, 5:07 p.m.