predict.rq.counts: Predictions from rq.counts Objects

Description Usage Arguments Value Author(s) See Also Examples

Description

This function computes predictions based on fitted linear quantile models.

Usage

1
2
3
## S3 method for class 'rq.counts'
predict(object, newdata, offset,
	na.action = na.pass, type = "response", ...)

Arguments

object

an rq.counts object.

newdata

an optional data frame in which to look for variables with which to predict. If omitted, the fitted values are used.

offset

an offset to be used with newdata.

na.action

function determining what should be done with missing values in newdata. The default is to predict NA.

type

the type of prediction required. The default "response" is on the scale of the response variable, i.e. the values are back-transformed using the inverse of the transformation hinv(Xb); the alternative "link" is on the scale of the linear predictors h(y) = Xb.

...

not used.

Value

a vector or a matrix or an array of predictions.

Author(s)

Marco Geraci

See Also

residuals.rq.counts, rq.counts, coef.rq.counts

Examples

1
2
3
4
5
6
# Esterase data
data(esterase)

# Fit quantiles 0.25 and 0.75
fit <- rq.counts(Count ~ Esterase, tau = 0.5, data = esterase, M = 50)
cbind(fit$fitted.values, predict(fit, type = "response"))

Qtools documentation built on May 2, 2019, 6:09 p.m.