The function util computes values for different types of utility functions and different parameters. See sgmodel_vignette for detailed functional forms.
Usage
util(x, A, prefparam, type = c("log", "CRRA", "CARA", "Cobb-Douglas", "CES"),
ngoods, ...)
Value
A numerical value, the utility function evaluated at the arguments.
Arguments
x
A numeric vector of length ngoods with values to compute utility for.
A
A numerical value that will premultiply the utility function. Default value set to 1.
prefparam
A numerical value, the preference parameter applied to the utility function depending on type.
type
A character for the Type of utility function. Can be "log", "CRRA", "CARA", "Cobb-Douglas", "CES". Default type set to "log".
ngoods
Numerical value for the number of goods to consider. Default value set to 1.