Learn R Programming

Countr (version 3.6.1)

renewal_methods: Methods for renewal objects

Description

Methods for renewal objects.

Usage

# S3 method for renewal
coef(object, ...)

# S3 method for renewal vcov(object, ...)

# S3 method for renewal residuals(object, type = c("pearson", "response", "prob"), ...)

# S3 method for renewal residuals_plot(object, type = c("pearson", "response", "prob"), ...)

# S3 method for renewal fitted(object, ...)

# S3 method for renewal confint( object, parm, level = 0.95, type = c("asymptotic", "boot"), bootType = c("norm", "bca", "basic", "perc"), ... )

# S3 method for renewal summary(object, ...)

# S3 method for renewal print(x, digits = max(3, getOption("digits") - 3), ...)

# S3 method for summary.renewal print( x, digits = max(3, getOption("digits") - 3), width = getOption("width"), ... )

# S3 method for renewal model.matrix(object, ...)

# S3 method for renewal logLik(object, ...)

# S3 method for renewal nobs(object, ...)

# S3 method for renewal extractAIC(fit, scale, k = 2, ...)

# S3 method for renewal addBootSampleObject(object, ...)

# S3 method for renewal df.residual(object, ...)

Arguments

object

an object from class "renewal".

...

further arguments for methods.

type, parm, level, bootType, x, digits

see the corresponding generics and section ‘Details’.

width

numeric width length.

fit, scale, k

same as in the generic.

Details

Objects from class "renewal" represent fitted count renewal models and are created by calls to "renewalCount()". There are methods for this class for many of the familiar functions for interacting with fitted models.

Examples

Run this code
fn <- system.file("extdata", "McShane_Wei_results_boot.RDS", package = "Countr")
object <- readRDS(fn)
class(object) # "renewal"

coef(object)
vcov(object)

## Pearson residuals: rescaled by sd
head(residuals(object, "pearson"))
## response residuals: not rescaled
head(residuals(object, "response"))

head(fitted(object))

## loglik, nobs, AIC, BIC
c(loglik = as.numeric(logLik(object)), nobs = nobs(object),
  AIC = AIC(object), BIC = BIC(object))

asym <- se.coef(object, , "asymptotic")
boot <- se.coef(object, , "boot")
cbind(asym, boot)
## CI for coefficients
asym <- confint(object, type = "asymptotic")
## Commenting out for now, see the nite in the code of confint.renewal():
## boot <- confint(object, type = "boot", bootType = "norm")
## list(asym = asym, boot = boot)
summary(object)
print(object)
## see renewal_methods
## see renewal_methods

Run the code above in your browser using DataLab