utility: Utility Function Models

Description Usage Arguments Details Value Author(s) References See Also Examples

Description

Fits utility models.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
utility_pow_d(
  formula,
  data,
  choicerule,
  fix = list(),
  discount = 0,
  options = list(),
  ...
)

utility_pow_c(formula, data, fix = list(), discount = 0, options = list(), ...)

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 or the string "start", the fixed model parameters, if missing all parameters are estimated. Model parameter names are rp, rn (see details - model parameters).

  • list(rp = 5.40) sets parameter rp equal to 5.40.

  • list(rp = "rn") sets parameter rp equal to parameter rn (estimates rn).

  • list(rn = "rp", rp = 5.40) sets parameter rn equal to parameter rp and sets rp equal to 5.40 (estimates none of the two).

  • list(rp = NA) omits the parameter rp, 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, or list(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.

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()):

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).

Author(s)

Jana B. Jarecki, jj@janajarecki.com

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(), shortfall

Examples

1
#  No examples yet

JanaJarecki/cogscimodels documentation built on Sept. 8, 2020, 7:28 p.m.