algo.farrington.fitGLM {surveillance}R Documentation

Fit the Poisson GLM of the Farrington procedure for a single time point

Description

The function fits a Poisson regression model (GLM) with mean predictor

log mu_t = alpha + beta * w

as specified by the Farrington procedure. That way we are able to predict the value c0. If requested Anscombe residuals are computed based on an initial fit and a 2nd fit is made using weights, where base counts suspected to be caused by earlier outbreaks are downweighted.

Usage

  algo.farrington.fitGLM(response, wtime, timeTrend = TRUE, 
                         reweight = TRUE)

Arguments

response The vector of observed base counts
wtime Vector of week numbers corresponding to response
timeTrend Boolean whether to fit the beta*t or not
reweight Fit twice – 2nd time with Anscombe residuals

Details

Compute weights from an initial fit and rescale using Anscombe based residuals as described in the anscombe.residuals function.

Value

An object of class GLM with additional fields wtime, response and phi. If the glm returns without convergence NULL is returned.

See Also

anscombe.residuals


[Package surveillance version 1.1-2 Index]