pdlm: Polynomial Distributed Lag Models

Description Usage Arguments Details Value Author(s) References See Also Examples

View source: R/pdlm.r

Description

Fit a constrained polynomial distributed lag model

Usage

1
pdlm(model, var, lags = 5, degrees = 2, ...)

Arguments

model

a model fitted by fit_core

var

a quoted string with the name with the exposure variable

lags

an integer indicating the number of lags to estimate the effects. Default is 5

degrees

an integer indicating the number of degrees for the constrained polynomial. Default is 2 for a parabolic shape

...

arguments passed on to other methods. See family

Details

This function updates model with the unconstrained distributed lag models using pdl. Then, the unconstrained coefficients and their standard errors are extracted using get.beta.

This model is thoroughly discussed in Schwartz (2000).

Value

The class pdlm is added to the model inheritance and the following list is returned

cmodel

the fitted constrained model

variate

the vector with exposure variate data

var.name

the name of exposure variate

beta

the unconstrained coefficients

lags

an integer indicating the lags used for the distributed lag structure

degrees

an integer indicating the degrees used for the polynomial in the distributed lag structure

call

function call

Author(s)

Washington Junger wjunger@ims.uerj.br and Antonio Ponce de Leon ponce@ims.uerj.br

References

Schwartz, J. (2000) The distributed lag between air pollution and daily deaths. Epidemiology 11(3), 320–326.

See Also

gam,glm,fit_core

Examples

1
2
3
4
5
data(admrio)
setup(admrio,"date")
f <- resp5~s(time)+weekdays+s(tmpmax)+s(humid)
m <- fit_core(f)
dlm <- pdlm(m,"pm10",lags=5,degrees=2)

wjunger/ares documentation built on Dec. 23, 2021, 5:17 p.m.