infer {prefeR}R 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")

[Package prefeR version 0.1.3 Index]