Description Usage Arguments Value Author(s) Examples
computes value functions for m
discrete labor
supply choices. no time separability assumed, i.e. labor
supply is not implied by current resources. computes V on
n
states. 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(cashR, saveR, EVR, hsizeR, laborR, par)
|
cashR |
numeric matrix |
saveR |
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 |
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 |
|
saving |
|
cons |
|
dchoiceL |
|
maxL |
|
Florian Oswald <florian.oswald@gmail.com>
1 2 3 4 5 6 7 8 9 10 11 | n = 25000 # number of states
k = 50 # number of savings choices by state
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)
saving <- matrix(seq(from=0,to=8,length=k),n,k,byrow=TRUE)
EV <- log(outer(1:n,1:k))
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,myNA=-1e9,tau=1)
res <- util_module(cashR=cash, saveR=saving, 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.