Standard Errors of a Fitted Generalised Linear Model for Time Series of Counts

Computes the standard errors for the parameters of a fitted GLM-type model for time series of counts.

"se"(object, B, parallel, level=0.95, ...)
an object of class "tsglm". Usually the result of a call to tsglm.
positive integer value giving the number of bootstrap samples to use for estimation of the standard errors. If missing the standard errors are based on a normal approximation.
logical value. If parallel=TRUE, the bootstrap is distributed to multiple cores parallely. Requires a computing cluster to be initialised and registered as the default cluster by makeCluster and setDefaultCluster from package parallel.
numeric value determining the desired coverage rate of confidence intervals.
additional arguments to be passed to the fitting function tsglm. Only made use of if the standard errors are computed by a bootstrap procedure.

By default the standard errors and confidence intervals are based on a normal approximation of the (quasi) maximum likelihood estimator. The standard errors are the square roots of the diagonal elements of the inverse of the information matrix. Because there is no analytical approximation of the standard error for the overdispersion coefficient sigmasq, its standard error and its confidence interval are set to NA.

If the number of bootstrap samples B is given, the standard errors and condidence intervals are computed by a parametric bootstrap. The standard errors are the empirical standard deviation of the parameter estimations of B random samples drawn from the fitted model given in argument object. The confidence intervals are the a- and (1-a)-quantile of this bootstrap sample with a=(1-level)/2.


A list with the following components:
a vector of the maximum likelihood estimated coefficients.
a vector of the standard errors of each estimated coefficient.
a matrix with the columns "lower" and "upper" giving the lower and upper boundaries of confidence intervals for the model parameters.
numerical value giving the coverage rate of the confidence intervals.
a character value "normapprox" or "bootstrap" giving how the standard errors are computed.
If the standard errors are computed by a parametric bootstrap procedure, the following component is additionally returned:
positive integer value giving the number of bootstrap samples used for estimation of the standard errors.

See Also

tsglm for fitting a GLM for time series of counts.

  • se.tsglm
  • se
###Road casualties in Great Britain (see help("Seatbelts"))
timeseries <- Seatbelts[, "VanKilled"]
regressors <- cbind(PetrolPrice=Seatbelts[, c("PetrolPrice")],
#Logarithmic link function with Poisson distribution:                    
seatbeltsfit <- tsglm(ts=timeseries, link="log",
  model=list(past_obs=c(1, 12)), xreg=regressors, distr="poisson")
se(seatbeltsfit) #by normal approximation

## Not run: 
# system.time(stderror <- se(seatbeltsfit, B=100)) #by bootstrap
# stderror
# #This estimation of bootstrap standard errors takes several minutes on a single
# #processing unit, of course depending on its speed.
# #Parallel computation for shorter run time on a cluster:
# library(parallel)
# ntasks <- 3
# clust <- makeCluster(ntasks)
# setDefaultCluster(cl=clust)
# system.time(stderror <- se(seatbeltsfit, B=100, parallel=TRUE))## End(Not run)
Documentation reproduced from package tscount, version 1.3.0, License: GPL-2 | GPL-3

Community examples

Looks like there are no examples yet.