extract.emdr2: Extract results from an emdr2 object

Description Usage Arguments Value See Also Examples

View source: R/emdr2.R

Description

extract.emdr2 extracts particular elements from an emdr2 object such as performance criteria or residuals. coef.emdr2 specifically extract regression coefficients.

Usage

1
2
3
4
extract.emdr2(object, what, select = NULL)

## S3 method for class 'emdr2'
coef(object, method = "coef", ...)

Arguments

object

An emdr2 object.

what

A character giving the name of the element to extract.

select

A character of numeric vector giving a subset of MIMFs for which to extract the element.

method

The coefficient method linked to the regression function used. The default should cover most cases.

...

Additional arguments to be passed to the method.

Value

extract.emdr2: a vector, matrix or list of the extracted elements. The class of the output depend on the type of element.

coef.emdr2: a nimfs x nvariable matrix of coefficients.

See Also

emdr2 to produce an emdr2 object.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
   library(dlnm)

   dat <- chicagoNMMAPS[,c("death", "temp", "rhum")]

   mimfs <- memd(dat)
   cmimfs <- combine.mimf(mimfs, list(12:13, 14:17, 18:19), 
     new.names = c("C12", "C13", "r"))

   lm.R2 <- emdr2(death ~ temp + rhum, mimf = cmimfs)
   betas.R2 <- coef(lm.R2)
   aic.R2 <- extract.emdr2(lm.R2, what = "aic")

PierreMasselot/Library--emdr documentation built on June 19, 2021, 8:58 a.m.