Learn R Programming

DBR (version 1.4.1)

predict.dbr: Predict method for Discretised Beta Regression Fits

Description

Predict method for Discretised Beta Regression Fits

Usage

# S3 method for dbr
predict(
  object
  , newdata = NULL
  , type = c("sample", "point")
  , ...
)

Value

If type is 'point', this will be a vector of same length as nrow(newdata), with unique values consistent with the dbr call. If type is 'sample', this will be a 2D array of size nrow(data) x nsmp.

Arguments

object

Standard R formula describing the response variable and predictors.

newdata

Data frame containing the predictors, matching the dbr call.

type

Whether to make point predictions or generate sample from the predictive distribution.

...

Further arguments passed to or from other methods.

Author

Mansour T.A. Sharabiani, Alireza S. Mahani

Examples

Run this code

if (FALSE) {

library("DBR")

data("pain")
est <- dbr(
  interference ~ severity + age
  , pain
  , control = dbr.control(
    nsmp = 200
    , nburnin = 100
  )
)

predict(est, type = "point")

}

Run the code above in your browser using DataLab