Skip to contents

Residual.logitmodel uses user provided data, person-year/event columns, vectors specifying the model, and options to calculate residuals for a solved Poisson regression

Usage

# S3 method for class 'logitmodel'
Residual(
  x,
  df,
  control = list(),
  a_n = NULL,
  link = "odds",
  pearson = FALSE,
  deviance = FALSE,
  ...
)

Arguments

x

result model for a regression, class logitmodel

df

a data.table containing the columns of interest

control

list of parameters controlling the convergence, see the control options vignette for details

a_n

list of initial parameter values, used to determine the number of parameters. May be either a list of vectors or a single vector.

Used in logistic regression, the linking function relating the input model and event probability. Current options are "odds", "ident", and "loglink" for the odds ratio, identity, and complimentary loglink options.

pearson

boolean to calculate pearson residuals

deviance

boolean to calculate deviance residuals

...

can include the named entries for the assign_control list parameter

Value

returns matrices of residuals