Description Usage Arguments Value Author(s) Examples
computes value functions for m
discrete labor
supply choices when there is no savings choice. The
current implementation computes the following functional
form for the utility function:
u(c,l,h) = (c * exp(alpha * l) )^1-gamma / (1-gamma) * exp( theta * phi(h) ) + mu * phi(h), phi(h) = 0 if h=0, phi(h) = phival if h=1, phi(h) = 1 if h=2
1 | util_module_file(cashR, EVR, hsizeR, laborR, par)
|
cashR |
numeric matrix |
EVR |
numeric matrix |
hsizeR |
vector |
laborR |
vector |
theta |
elasticity of substitution between c and h |
phival |
value of relative utility difference flat vs house |
mu |
weight on additive utility premium |
gamma |
coefficient of relative risk aversion |
cutoff |
minimum level of consumption. below cutoff, u(c) is quadratically approximated. |
alpha |
coefficient on labor |
quad |
boolean of whether neg cons quadratically approximated or not |
borrconst |
boolean of whether there are borrowing constraints built into the savings matrix |
myNA |
numerical value to be assigned to values with negative consumption (if quad == FALSE) |
tau |
numerical value of proportional consumption scaling. a value in [0,infty). used in welfare experiments |
list with elements
values |
|
dchoiceL |
|
maxL |
|
Florian Oswald <florian.oswald@gmail.com>
1 2 3 4 5 6 7 8 9 | n = 5 # number of states
m = 3 # number of discrete labor choices by state
cash <- matrix(1:n,n,m)
cash <- cash + matrix(0:2,n,m,byrow=TRUE)
labo <- seq(from=0,to=1,length=m)
EV <- log(1:n)
hsize <- sample(0:2,size=n,replace=TRUE)
pars <- list(theta=0.2,phival=0.9,mu=0.6,gamma=1.4,cutoff=0.1,alpha=-0.6,quad=FALSE,borrconst=FALSE,myNA=-1e9,tau=1)
res <- util_module_file(cashR=cash, EVR=EV, hsizeR=hsize, laborR=labo, par=pars)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.