[Gretl-users] Overview of nls
Allin Cottrell
cottrell at wfu.edu
Thu Jun 29 16:32:28 EDT 2006
On Thu, 29 Jun 2006, Ryan J. Pieszak wrote:
> In the documentation shown below (from the gretl-guide.pdf),
> are the regression functions being passed in standard
> functions? How would I know what function to pass in? My
> assumption was that I could just pass in the data sets and
> gretl would give back the parameters used to build the
> function.
I'm not quite sure I understand the question but I'll try.
In gretl's NLS you, the user, have to specify the nonlinear
function that you believe may be generating the data. For
example,
> nls C = alpha + beta * Y^gamma
is a nonlinear consumption function that William Greene put
forward as a possible generalization of the "simple textbook"
version
C = alpha + beta * Y
How do you come up with such functions? Basically, either you
find them suggested in the economics literature, or you invent
them yourself based on your knowledge of general economic theory
and your intuition.
There are some programs available (e.g. genetic algorithms)
where you can throw in a dependent variable and a mess of
independent variables, and ask the program to figure out how
they are related, if at all. Gretl's NLS is not like that: you
supply a structure and gretl figures out the optimal parameter
values.
> Also, it says that if the nonlinear function is a
> generalization of a linear model, running the ols and passing
> it's coefficient estimates in as the intial parameters would
> be more accurate. How do I know if the nonlinear function is
> a generalization of a linear model?
That's really just a matter of mathematical perception. In
relation to Greene's function above, you can see that if gamma =
1 it reduces to a linear relationship between C and Y, so we
might try starting with gamma = 1. In general, we ask: is there
some parameter in this function such that, if we set it to 1 or
0 or something, the function collapses to a linear one?
Allin Cottrell
More information about the Gretl-users
mailing list