Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

predict.sbchoice

Predicting model for sbchoice


Description

Predicting method for objects of class "sbchoice".

Usage

## S3 method for class 'sbchoice'
predict(object, newdata = NULL, type = c("utility", "probability"), 
...)

Arguments

object

an object of class "sbchoice".

newdata

a data frame containing new data to predict. If NULL, the original data is used.

type

type of prediction (utility or probability).

...

optional arguments. Currently not in use.

Details

The function predict() for S3 object "sbchoice" calculates predicted values according to the fitted model that is included in object. The values are predicted with the original data used for fitting the model if newdata = NULL, otherwise with a new data assigned to newdata.

The current function does not estimate standard errors of predicted values.

Value

When newdata = NULL and type = utility, a vector containing utility values of choosing Yes under bid values is returned. When newdata = NULL and type = probability, a vector containing probabilities of choosing Yes is returned. When a new data is assigned to newdata, a vector containing utility values of choosing Yes (type = utility) or probability of choosing Yes (type = probability) under the new data is returned.

See Also

Examples

## See Examples in sbchoice.

DCchoice

Analyzing Dichotomous Choice Contingent Valuation Data

v0.0.17
GPL (>= 2)
Authors
Tomoaki Nakatani [aut, cph] (original developer), Hideo Aizaki [aut, cre] (code patches), Kazuo Sato [ctb] (theoretical part of the manual)
Initial release
2020-09-30

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.