infer: A function that estimates the user's underlying utility...

View source: R/inference.R

inferR Documentation

A function that estimates the user's underlying utility function.

Description

A function that estimates the user's underlying utility function.

Usage

infer(p, estimate = "recommended", nbatch = 1000)

Arguments

p

A BayesPrefClass instance.

estimate

The type of posterior point-estimate returned. Valid options are "recommended" (default), "MAP", and "mean".

nbatch

If using Monte Carlo estimates, the number of samples. Defaults to 1000.

Value

A vector of parameters that best fits the observed preferences.

Examples

 p <- prefEl(data = data.frame(c(1,0,1), c(0,1,1), c(1,1,1)),
             priors = c(Normal(0, 1), Exp(0.5), Flat()))
 p$addPref(1 %>% 2)
 infer(p, estimate = "MAP")

jlepird/prefeR documentation built on April 29, 2022, 5:47 a.m.