predict.eoa: predict.eoa

Description Usage Arguments Value Author(s)

View source: R/predict.eoa.r

Description

Prediction method for eoa objects.

Usage

1
2
3
## S3 method for class 'eoa'
predict(object, newdata, type = "response", p = c(0.025,
  0.5, 0.975), ...)

Arguments

object

an eoa object produced by function eoa

newdata

A data frame containing new covariate values at which to do the prediction.

type

Text string specifying the type of prediction.

  • "response" returns the predicted value of the eoa rate parameter, lambda, evaluated using the median coefficient estimates in object. "response" evaluates the model using object$estimates[object$coef.labels] (or coef(object)) as coefficients, and returns the result after taking the anti-log (exp()).

  • "quantile" returns a quantile from the distribution of the eoa rate parameter, lambda, evaluated using all the posterior samples of the coefficients. "quantile" evaluates the model using all posterior samples of the coefficients housed in object$out, and returns the p-th quantile(s) from the distribution of these predicted values (in anti-log space). This provides a way to compute predictive intervals for the response. Setting type="quantile" and p=c(0.025, 0.975) produces a 95

p

A vector specifing which quantiles to return when type="quantile".

...

Included for compatability with other predict methods.

Value

If newdata is NULL, the predicted lambda values for every row of the fitting data set. If newdata is not NULL, results of applying the lambda model to covarates in newdata.

Author(s)

Trent McDonald


tmcd82070/evoab documentation built on May 13, 2020, 11:25 p.m.