Re: two questions from a researcher
- From: "Aleksander Hansen" <ab2006@xxxxxxxxxxxxxx>
- Date: Sun, 12 Aug 2007 13:07:47 +0000 (UTC)
Thanks a lot for your answer. I greatly appreciate it. I
have a follow-up question that I hope will clarify a key
point:
Its a function of inf. So what function is it?
There are infinitely many families of functions.
If beta is a linear function of inf, then a
linear regression will solve it.
Do you mean that beta is a function of unknown
form? We might choose to estimate a least
squares cubic spline for the function beta.
So in the regression:
y1(t+1)-y1(t)= alpha + beta(definf)*[y2(t)-y1(t)] + e
I believe that beta is a linear function of definf.
However, I guess my phrasing of the question was rather
poor. What I meant to ask was actually: how do I go about
running such a linear regression, when I want beta to be a
function of definf. That is, what exactly do I need to do
to in terms of coding in order to make beta a function of
some variable, in this case definf, rather than just a
normal coefficient?
---------------------------------------
John D'Errico <woodchips@xxxxxxxxxxxxxxxx> wrote in
message <woodchips-
40551B.06313912082007@xxxxxxxxxxxxxxxxxxxxx>...
In article <f9k3j8$sci$1@xxxxxxxxxxxxxxxxxx>, "Aleksander Hansen"
<ab2006@xxxxxxxxxxxxxx> wrote:
Reply
Two questions from a researcher (respondents will be
cited)
Posted: Aug 11, 2007 6:30 AM Plain Text
published in
I'm a researcher working on a paper due to be
mightlate August, but I'm new to Matlab, so I have what
+ every well be two rediculously simple questions:
1) I want to run a couple of regressions, first:
y1(t+1) - y1(t)= alpha + beta*[y2(t)-y1(t)] + psi*inf
it,
Never use a variable like "inf". Its used for,
well, inf in Matlab. While you can define such
a variable, you might find yourself wanting to
use inf one day, and then expect serious confusion
to result. For example:
inf =inf = 3
3
pi =pi = 3
3
While some school boards in Kansas might be
quite happy with this, debugging later code
might be interesting.
this regression is pretty basic and I know how to do
infhowever, now I want to run the exact same regression
except that instead of psi being a factor loading and
aa variable as in the above equation I want beta to be
runfunction of the variable inf such that:
y1(t+1)-y1(t)=alpha + beta(inf)*[y2(t)-y1(t)] + e.
So my first question is, how do I specify such a
regression?
Its a function of inf. So what function is it?
There are infinitely many families of functions.
Some are nonlinear in the parameters, some are
linear. so there are different ways one must
solve the problem.
If beta is a linear function of inf, then a
linear regression will solve it.
Do you mean that beta is a function of unknown
form? We might choose to estimate a least
squares cubic spline for the function beta.
2) Let's say I have an equation:
D/P = d0 + d1*z(t) + e
and that I have data available for D and P (or simply
D/P). d0 is a constant, and e the usual error term.
However, I do not have any data for the variable z(t),
that is, I believe the functional form above is a good
proxy for z(t) but since I cannot observe z(t) I can't
preferably the same, cat.the regression. How would I go about and running this
regression?
So you have some data in the form of
a ratio, D(t)/P(t). Really, we can write
this in a form
F(t) = D(t)/P(t)
It apparently has some underlying smooth
functional relationship, but of unknown form.
Use the splines toolbox to fit it as a least
squares spline (spap2), or perhaps a smoothing
spline (spaps).
The parameters d0 and d1 are completely
meaningless, since they can arbitrarily be
absorbed into any such spline. If you prefer
though I can consult my crystal ball...
I have just consulted my crystal ball, and
without any loss of flexibility in your model,
I have determined that
d0 == pi
d1 == 3
Yes, it is a singularly clear crystal ball
today. I hope that no other responders suggest
that these values are wrong.
Seriously, since z(t) is unknown, then we
can absorb any constant factor into it and
translate it by any constant offset.
D/P = z(t) + e
HTH,
John
--
The best material model of a cat is another, or
A. Rosenblueth, Philosophy of Science, 1945others.
Those who can't laugh at themselves leave the job to
Anonymous
.
- Follow-Ups:
- Re: two questions from a researcher
- From: John D'Errico
- Re: two questions from a researcher
- References:
- two questions from a researcher
- From: Aleksander Hansen
- Re: two questions from a researcher
- From: John D'Errico
- two questions from a researcher
- Prev by Date: Re: two questions from a researcher
- Next by Date: Re: Can the interface between Matlab and C/Fortran be float(single precision floating point)?
- Previous by thread: Re: two questions from a researcher
- Next by thread: Re: two questions from a researcher
- Index(es):
Relevant Pages
|
Loading