n.extract: Sample size extractor for fitted models.

Description Usage Arguments Details Value Author(s)

Description

Tool to extract sample size from different fitted model objects, and return it in a standard format.

Usage

1
2
## Default S3 method:
n.extract(object)

Arguments

object

a fitted model object.

Details

n.extract is a generic function to extract a named scalar ā€œnā€ from the fitted model object.

Currently the default method assumes object is a list and tries to extract an element called ā€œnā€. A method is also provided for class lm (which works also for glm) which calculates the sample size from the number of non-missing residuals.

Value

The sample size that was analysed.

Author(s)

Toby Johnson Toby.x.Johnson@gsk.com


tobyjohnson/gtx documentation built on Aug. 30, 2019, 8:07 p.m.