
Utility Function Models
utility.Rd
Fits utility models.
utility_pow_c()
fits a power utility for continuous responses.utility_pow_d()
fits a power utility for discrete respoonses.
Arguments
- formula
A formula, the variables in
data
to be modeled. For example,y ~ x1
models response y as function of one stimulus value x1.- data
A data frame, the data to be modeled.
- choicerule
A string, the choice rule. Allowed values, see
cm_choicerules()
:"none"
is no choice rule,"softmax"
is soft-maximum,"luce"
is Luce's axiom.- fix
(optional) A list with parameter-value pairs of fixed parameters. If missing all free parameters are estimated. If set to
"start"
all parameters are fixed to their start values. Model parameter names arerp
,rn
(see details - model parameters).list(rp = 5.40)
sets parameterrp
equal to 5.40.list(rp = "rn")
sets parameterrp
equal to parameterrn
(estimatesrn
).list(rn = "rp", rp = 5.40)
sets parameterrn
equal to parameterrp
and setsrp
equal to 5.40 (estimates none of the two).list(rp = NA)
omits the parameterrp
, if possible."start"
sets all parameters equal to their initial values (estimates none). Useful for building a first test model.
- discount
A number, how many initial trials to not use during parameter fitting.
- options
(optional) A list, list entries change the modeling procedure. For example,
list(lb = c(k=0))
changes the lower bound of parameter k to 0, orlist(fit_measure = "mse")
changes the goodness of fit measure in parameter estimation to mean-squared error, for all options, see cm_options.- ...
other arguments, ignored.
Value
Returns a cognitive model object, which is an object of class cm. A model, that has been assigned to m
, can be summarized with summary(m)
or anova(m)
. The parameter space can be viewed using pa. rspace(m)
, constraints can be viewed using constraints(m)
.
Details
The power utility \(U(x)\) of positive inputs, \(x > 0\), is \(x^r\) if \(r > 0\), and is \(log(x)\) if \(r = 0\), and is \(-x^r\) if \(r < 0\). The power utility of negative inputs \(x\) is \(-U(-x)\) with a separate exponent r (Wakker, 2008). To fit a power utility with one single exponent for positive and negative x, set fix = list(rp = "rn")
, not recommended for mixed input.
Model Parameters
The model has between 1 and 3 free parameters, depending on model and data
(see npar()
):
rp
is the power utility exponent for positive data \(x \ge\) 0 (omitted if all \(x <\) 0).rn
is the exponent for negative data \(x < 0\) (omitted if all \(x \ge\) 0).In
utility_pow_c()
:sigma
is the standard deviation of the normally-distributed loglikelihood of the responses.In
utility_pow_d()
: Ifchoicerule = "softmax"
:tau
is the temperature or choice softness, higher values cause more equiprobable choices. Ifchoicerule = "epsilon"
:eps
is the error proportion, higher values cause more errors from maximizing.
References
Wakker, P. P. (2008). Explaining the characteristics of the power (CRRA) utility family. Health Economics, 17(12), 1329-1344. doi:10.1002/hec.1331
Tversky, A. (1967). Utility theory and additivity analysis of risky choices. Journal of Experimental Psychology, 75(1), 27-36. doi:10.1037/h0024915
See also
Other cognitive models:
baseline_const_c()
,
bayes()
,
choicerules
,
cpt
,
ebm()
,
hm1988()
,
shift()
,
shortfall
,
threshold()
Author
Jana B. Jarecki, jj@janajarecki.com