Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

alteredvglm

Altered, Inflated and Truncated Values in GAIT Regression


Description

Return the altered, inflated and truncated values in a GAIT regression object, else test whether the model is altered, inflated or truncated

Usage

altered(object, ...)
inflated(object, ...)
truncated(object, ...)
is.altered(object, ...)
is.inflated(object, ...)
is.truncated(object, ...)

Arguments

object

an object of class "vglm". Currently only a GAIT regression object returns valid results of these functions.

...

any additional arguments, to future-proof this function.

Details

Yee and Ma (2020) propose GAIT regression where values from three disjoint sets are referred to as special. These extractor functions return one set each; they are the alter, inflate, truncate (and sometimes max.support) arguments from the family function.

Value

Returns one type of ‘special’ sets associated with GAIT regression. This is a vector, else a list for truncation. All three sets are returned by specialsvglm.

Warning

Some of these functions are subject to change. Only family functions beginning with "gait" will work with these functions, hence zipoisson fits will return FALSE or empty values.

References

Yee, T. W. and Ma, C. (2020). Generally–altered, –inflated and –truncated regression, with application to heaped and seeped counts. In preparation.

See Also

Examples

abdata <- data.frame(y = 0:7, w = c(182, 41, 12, 2, 2, 0, 0, 1))
fit1 <- vglm(y ~ 1, gaitpoisson(alt.mix = 0),
             data = abdata, weight = w, subset = w > 0)
specials(fit1)  # All three sets
altered(fit1)  # Subject to change
inflated(fit1)  # Subject to change
truncated(fit1)  # Subject to change
is.altered(fit1)
is.inflated(fit1)
is.truncated(fit1)

VGAM

Vector Generalized Linear and Additive Models

v1.1-5
GPL-3
Authors
Thomas Yee [aut, cre], Cleve Moler [ctb] (author of several LINPACK routines)
Initial release
2021-01-13

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.