Polynomial distributed lag glms
Usage
pdlglm(formula, data, family, na.action=na.omit, ...)
Arguments
formula
|
As for glm except for special handling of pdl() terms
|
data
|
see glm
|
family
|
see glm
|
na.action
|
handling for missing values
|
...
|
see glm
|
Description
Fits a generalised linear model to time series data with special handling for polynomial distributed lag terms. When a pdl()
term is included in the model formula it is expanded by the print
and summary
methods so that coefficients, standard errors and covariances for the lagged values of the predictor are reported. The print
and summary
methods give the same output as for glm
; the plot
method produces a plot of the fitted lag structure.Value
An object of class pdlglm
Author(s)
Thomas LumleySee Also
lm
,glm
Examples
xx<-rnorm(1000)
zz<-rnorm(1000)
yy<--rnorm(1000)+sin(zz)+lagged(xx,1)
m<-pdlglm(yy~pdl(zz,4,2)+sin(zz)+pdl(xx,4,4))
m
summary(m)
par(mfrow=c(2,1))
plot(m)