fit.glm {chicane}R Documentation

fit.glm

Description

Fit GLM according to a specified distribution. This needs to be done separately from glm in order to include negative binomial and truncated distributions as options.

Usage

fit.glm(
  formula,
  data,
  distribution = c("negative-binomial", "poisson", "truncated-poisson",
    "truncated-negative-binomial"),
  start = NULL,
  init.theta = NULL,
  maxit = 100,
  epsilon = 1e-08,
  trace = FALSE
)

Arguments

formula

Formula specifying model of interest

data

Data frame containing variables specified in formula

distribution

Name of distribution of the counts. Options are 'negative-binomial', 'poisson', 'truncated-poisson', and 'truncated-negative-binomial'

start

Starting values for model coefficients

init.theta

Initial value of theta if fitting the negative binomial distribution

maxit

Maximum number of IWLS iterations for fitting the model (passed to glm.control)

epsilon

Positive convergence tolerance for Poisson and negative binomial models. Passed to glm.control

trace

Logical indicating if output should be produced for each of model fitting procedure. Passed to glm.control or gamlss.control

Value

List with elements

model

model object

expected.values

vector of expected values for each element in original data

p.values

vector of p-values for test of significantly higher response than expected


[Package chicane version 0.1.8 Index]