predict.B2mix: Predict Method for Bmix

View source: R/predict.B2mix.R

predict.B2mixR Documentation

Predict Method for Bmix

Description

Predict Method for Binomial Mixtures

Usage

## S3 method for class 'B2mix'
predict(object, newdata, Loss = 2, newk, ...)

Arguments

object

fitted object of class "B2mix"

newdata

Values at which prediction is desired an n by 2 matrix

Loss

Loss function used to generate prediction: Currently supported values: 2 to get mean predictions, 1 to get median predictions, 0 to get modal predictions or any tau in (0,1) to get tau-th quantile predictions.

newk

k values (number of trials) for the predictions an n by 2 matrix

...

optional arguments to predict

Details

The predict method for B2mix objects will compute posterior means.

Value

A vector of predictions

Author(s)

Jiaying Gu and Roger Koenker


REBayes documentation built on Aug. 19, 2023, 5:10 p.m.