Delali Accolley

20 Reputation

3 Badges

15 years, 138 days

MaplePrimes Activity


These are replies submitted by Delali Accolley

@mmcdara 

I know you spent a lot of time trying to help. I thank you. The problem is not about the model being incorrectly set, as the equations are the optimality conditions from a well known economic model called overlapping generations model. The solution you are proposing, which is solving the system without the argument v, is not the right one. It suits an infinitely-lived (or representative) agent model, but not an overlapping generations one. Thanks again for having tried to help. It is appreciated.

@mmcdara 

Thanks for your reply. I am seeking a numerical solution that I can plot as a function of time t. The argument v is the date of birth. To the best of my knowledge, there is no way one can get rid of the argument v. An attempt at doing so will be to define v as t-g, where g denotes the age. Even doing this does not reduce the number of arguments, as g replaces v.

Thus, l(t,v), which is the labor supply at time t of an agent born at time v, cannot be transformed into l(t). L(t) is the aggregation of l(t,v) for all the agents born between v=t-T and t.

Eq 9 is an exogenous perturbation I am adding to the system to see the way it reacts when the value of x changes over time. If there is a way to declare x(t) as an exogenous variable, it will be fine. Doing this will reduce the system to a set of 8 equations in 8 unknowns, a(t,v), c(t,v), l(t,v), L(t), K(t), r(t), w(y), Y(t). The number of equations being equal to the number of unknowns, there is a numerical solution to the system, given the values I have assigned to the parameters alpha, delta, rho, sigma, and x(t). Regards

NULL

restart; with(PDEtools)

alpha := .3306341; delta := solve(1+0.4877489e-1 = exp(delta_a)); T := 1

l0 := 42.375*(33.16667/(52*(24-9.95)*7)); L0 := l0*T

x0 := 0

IOR := .2093723865

KOR := IOR/delta

r0 := alpha/KOR-delta; rho := r0; fsolve({K0 = Y0*KOR, w0 = (1-alpha)*Y0/L0, alpha*exp(x0)*K0^(alpha-1)*L0^(1-alpha) = r0+delta}); assign(%)

0.2758153402e-1

 

{K0 = 2.510740299, Y0 = .5710794198, w0 = 1.390997088}

(1)

C0 := -K0*delta+Y0; c0 := C0/T

.4515111588

 

.4515111588

(2)

sigma := w0*(1-l0)/c0

2.234133040

(3)

eq1 := diff(c(t, v), t) = (r(t)-rho)*c(t, v)

eq2 := sigma*c(t, v) = w(t)*(1-l(t, v))

eq3 := r(t)*a(t, v)+w(t)*l(t, v) = c(t, v)+diff(a(t, v), t)

eq4 := Y(t) = exp(x(t))*K(t)^alpha*L(t)^(1-alpha)

eq5 := r(t)-delta = alpha*Y(t)/K(t)

eq6 := w(t) = (1-alpha)*Y(t)/L(t)

eq7 := K(t) = int(a(t, v), v = t-T .. t)

eq8 := L(t) = int(l(t, v), v = t-T .. t)

"x(t):=.01; #` x`(t):=piecewise(t=0,0,t>0,.01): "

proc (t) options operator, arrow, function_assign; 0.1e-1 end proc

(4)

eq := {eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8}

SV := {K(0) = K0, L(0) = L0, Y(0) = Y0, a(t, 0) = 0, c(0, 0) = c0, l(0, 0) = l0, r(0) = r0, w(0) = w0}

pdsolve(eq, SV, numeric, 'time' = t, 'range' = 0 .. T)

Error, (in pdsolve/numeric/process_PDEs) variable(s) {v} are in the PDE system but are not dependent or independent variables

 

NULL

Download OLG.mw

@mmcdara 
Hi, I have uploaded the file again. You can download it now. I have to precise that eq9 is an exogenous variable (i.e. a shock added to the system after time 0). Thanks for your help.

NULL

restart; with(PDEtools)

alpha := .3306341; delta := solve(1+0.4877489e-1 = exp(delta_a)); T := 1

l0 := 42.375*(33.16667/(52*(24-9.95)*7)); L0 := l0*T

x0 := 0

IOR := .2093723865

KOR := IOR/delta

r0 := alpha/KOR-delta; rho := r0; fsolve({K0 = Y0*KOR, w0 = (1-alpha)*Y0/L0, alpha*exp(x0)*K0^(alpha-1)*L0^(1-alpha) = r0+delta}); assign(%)

0.2758153402e-1

 

{K0 = 2.510740299, Y0 = .5710794198, w0 = 1.390997088}

(1)

C0 := -K0*delta+Y0; c0 := C0/T

.4515111588

 

.4515111588

(2)

sigma := w0*(1-l0)/c0

2.234133040

(3)

eq1 := diff(c(t, v), t) = (r(t)-rho)*c(t, v)

eq2 := sigma*c(t, v) = w(t)*(1-l(t, v))

eq3 := r(t)*a(t, v)+w(t)*l(t, v) = c(t, v)+diff(a(t, v), t)

eq4 := Y(t) = exp(x(t))*K(t)^alpha*L(t)^(1-alpha)

eq5 := r(t)-delta = alpha*Y(t)/K(t)

eq6 := w(t) = (1-alpha)*Y(t)/L(t)

eq7 := K(t) = int(a(t, v), v = t-T .. t)

eq8 := L(t) = int(l(t, v), v = t-T .. t)

eq9 := x(t) = piecewise(t = 0, 0, t > 0, 0.1e-1)

eq := {eq1, eq2, eq3, eq4, eq5, eq6, eq7, eq8, eq9}

SV := {K(0) = K0, L(0) = L0, Y(0) = Y0, a(t, 0) = 0, c(0, 0) = c0, l(0, 0) = l0, r(0) = r0, w(0) = w0}

pdsolve(eq, SV, numeric, 'time' = t, 'range' = 0 .. T)

Error, (in pdsolve/numeric/process_PDEs) variable(s) {v} are in the PDE system but are not dependent or independent variables

 

sol := pdsolve(eq, SV, 'time' = t, 'range' = 0 .. T)

(4)

 

``

Download OLG.mw

@tomleslie 

Both options are useful. Once agin many thanks for your help. God bless!

@tomleslie 

Please, how do I apply the assign command to Osol (the solution of your pptimization problem). I have tried assign(Osol) and assign(%), but it did not work. I would like to access the value of each of the variables by using its name, e.g. a2; a3; a4. Regards

@acer

Thanks for your reply. The parameter tau_l, denoting the labor income tax rate, could assume any value between 0 and (say) .3. Regards

@acer 

Thanks for your help. Indeed, I had a very old version of Maple. I am now using the latest version. Your solution seems to work only for tau_l=.08. In my initial file, it works only for tau_l=.06. What could explain that? How do I set the Digit if I want it to work for all possible values of this parameters? Regards

@tomleslie 

I have run your file using the latest version of Maple. It works even for all the possible values of the parameter tau_l. Regards

@tomleslie 

Many thanks for your reply. I have not been able to run the file you attached, but I will keep trying. Regards

Many thanks to all for your help

@Carl Love , Please, how did you select the value assigned to Digits? Does it have to do with the number of equations or variables? I do not think so. Because, I have changed the value assigned to the parameter ppsi to

1.947717707.

Maple is not returning any solution but I should have as solution,

a1 = .001429702370;

a2 = .05359982467;

c0 = .04074911445;

c1 = .06013098441;

c2 = .08873162853;

e0 =.2344194943;

h = .5898272762;

h1 =1.456583;

k = .05218750893;

l0 = .1114825847;

l1 = .3373447081;

r = .655446246;

w = .3221564941;

y = .2764103032;

epsilon1 = .04295105598;

 

 

@Carl Love , It has worked. I appreciate your help. Many thanks

Page 1 of 1