View source: R/Qtools_counts.R
predict.rq.counts | R Documentation |
This function computes predictions based on fitted linear quantile models.
## S3 method for class 'rq.counts'
predict(object, newdata, offset,
na.action = na.pass, type = "response",
namevec = NULL, ...)
object |
an |
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 |
na.action |
function determining what should be done with missing values in |
type |
the type of prediction required. The default |
namevec |
character giving the name of the covariate with respect to which the marginal effect is to be computed. If |
... |
not used. |
a vector or a matrix or an array of predictions.
Marco Geraci
residuals.rq.counts
, rq.counts
, coef.rq.counts
, maref.rq.counts
# 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"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.