PatrickT

Dr. Patrick T

2108 Reputation

18 Badges

16 years, 306 days

MaplePrimes Activity


These are replies submitted by PatrickT

I'll answer my own question -- but allow me to ask: is this the most efficient way to construct the matrix below?



hdr := < < `x`          | `f(x)` >,
         < `----------` | `----------` > >:
X := [1, 2, 3, 4, 5]:
body := < seq( < x | f(x) >, x = X ) >:
< hdr, body >;

                      [    x            f(x)   ]
                      [                        ]
                      [----------    ----------]
                      [                        ]
                      [    1            f(1)   ]
                      [                        ]
                      [    2            f(2)   ]
                      [                        ]
                      [    3            f(3)   ]
                      [                        ]
                      [    4            f(4)   ]
                      [                        ]
                      [    5            f(5)   ]

Many thanks Joe, for your very timely help!

Many thanks Joe, for your very timely help!

Thanks Joe, that's pretty close.

In the following, how do I tell f to evaluate at the values given in the X and Y lists, so as to get the output shown ?

 

X := [25, 30, 35];
Y := [25, 30, 35];
Matrix(3,3,f????);



                                        [f(25, 25)    f(25, 30)    f(25, 35)]
                                        [                             ]
                                        [f(30, 25)    f(30, 30)    f(30, 35)]
                                        [                             ]
                                        [f(35, 25)    f(35, 30)    f(35, 35)]



Thanks Joe, that's pretty close.

In the following, how do I tell f to evaluate at the values given in the X and Y lists, so as to get the output shown ?

 

X := [25, 30, 35];
Y := [25, 30, 35];
Matrix(3,3,f????);



                                        [f(25, 25)    f(25, 30)    f(25, 35)]
                                        [                             ]
                                        [f(30, 25)    f(30, 30)    f(30, 35)]
                                        [                             ]
                                        [f(35, 25)    f(35, 30)    f(35, 35)]



Actually, I've got a function of 2 variables to arrange in a matrix, so perhaps I need something a little different -- instead of hijacking this thread further, I started a new thread: http://www.mapleprimes.com/forum/matrixcontainingvaluesfxylistxy

Actually, I've got a function of 2 variables to arrange in a matrix, so perhaps I need something a little different -- instead of hijacking this thread further, I started a new thread: http://www.mapleprimes.com/forum/matrixcontainingvaluesfxylistxy

Doug: I just reached this old thread, which seems to be doing something I'm after.

Would you give an example of what to write on the right-hand side of:

body :=
body2 :=

many thanks,

Patrick.

Doug: I just reached this old thread, which seems to be doing something I'm after.

Would you give an example of what to write on the right-hand side of:

body :=
body2 :=

many thanks,

Patrick.

Thanks for getting back with what you did. It was incredibly slow on my machine, I had to set h:=0.01: to obtain something in finite time. Nice.

P.S. proper credit belongs to Robert, as I merely copied his input.

Thanks for getting back with what you did. It was incredibly slow on my machine, I had to set h:=0.01: to obtain something in finite time. Nice.

P.S. proper credit belongs to Robert, as I merely copied his input.

There's a substitution that will solve this ODE. I don't know enough Maple to help much here.

The substition below supposedly simplifies the equation, but its solution is not yet expressible in a simple way...

ODE := diff(y(t),t,t) + t*diff(y(t),t) + 4*y(t) = 0;
odeadvisor(ODE);
[[_2nd_order, _with_linear_symmetries]]
PDEtools[dchange]({y(t)=exp(u(t))},ODE,[u(t)]);
newODE := simplify(%/exp(u(t)));
odeadvisor(newODE);
[[_2nd_order, _missing_y], [_2nd_order, _reducible, _mu_xy]]
dsolve(newODE);

There's a substitution that will solve this ODE. I don't know enough Maple to help much here.

The substition below supposedly simplifies the equation, but its solution is not yet expressible in a simple way...

ODE := diff(y(t),t,t) + t*diff(y(t),t) + 4*y(t) = 0;
odeadvisor(ODE);
[[_2nd_order, _with_linear_symmetries]]
PDEtools[dchange]({y(t)=exp(u(t))},ODE,[u(t)]);
newODE := simplify(%/exp(u(t)));
odeadvisor(newODE);
[[_2nd_order, _missing_y], [_2nd_order, _reducible, _mu_xy]]
dsolve(newODE);

you do need to make assumptions about the stochastic process in order to derive explicit calculations of the variances and covariances -- why don't you assume that the xs are fixed real numbers? then your life would be a great deal easier as you would only need to track the effects of the error term (but hey you will need to make an assumption about the error term sooner rather than later).

If you want your xs to be stochastic, you could perhaps assume they are drawn from a normal distribution (this is a popular choice of stochastic process) and independent of the error term (this is a usually very harmful assumption, but unfortunately very common, oh well). You will find the calculations and formulae in any intermediate econometrics books (and in some introductory books too). Once you understand the ideas, you can code it into Maple.

You will find some theory and practical examples in : Introductory Econometrics: A Modern Approach (with Economic Applications, Data Sets, Student Solutions Manual Printed Access Card) by Jeffrey Wooldridge. There are of course many other useful books on the subject. I bet there are "econometrics with Maple" books too, though I have never read one.

A popular software for econometrics is Stata, which has all these formulae already coded in, and like Maple has a vibrant online commmunity, but by all means do try to code the formulae yourself in Maple, you won't unlearn from that.

I (and others, I think) have problems understanding what you're trying to do. I know efficiency wage models, but I still don't understand what you're after. As I wrote earlier, it would help if you would spell out clearly what you're looking for -- is it a real-valued function f(e), satisfying a certain profit-maximization problem? is it an effort function e(w)

Please define your notation:

e = amount of effort (as measured by the amount of sweat and stress produced by the worker, say)
L = amount of labor (as measured by the effective number of hours spent at work, whether sweating or whether chilling out)
f(e) = some unknown function
w = the wage rate (per hour spent at work irrespective of effort)
b = some parameter of something
lambda = some parameter of the same thing that b is a parameter of, whatever that is
etc.

Please define your problem:

select w or e or both to maximize f(e)-w*L subject to some constraint?

Please define your assumptions:

e = endogenous
w = exogenous/endogenous?
L = exogenous/endogenous?

Explain clearly when you're looking at a function or a constant. Is L is a known constant? A constant to be determined? a known function L(w)? a function L(w) to be determined? Same question for e(w) and f(e).

If you clarify the above, I may be able to help (though I can't promise of course).

Having said that, the elasticity condition you derive (known as the Solow condition, after Robert Solow, yes the same Solow who got a Nobel for his growth model) allows you to solve for e(w), a simple linear ode of the Euler type (the same Euler of the Euler equation of the calculus of variations, but the use of Euler here refers to another of his contributions):

> dsolve( w*diff(e(w), w) = e(w) );

                             e(w) = _C1 w

This is inconsistent with some other thing you write,

e := ((w-b)/b)^lambda:

Is the above an assumption, a result ? Are you merging two models?

First 75 76 77 78 79 80 81 Last Page 77 of 93