Page 2 of 2

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 3:52 pm
by EViews Gareth
The specification you have above doesn't include any series. If your estimation doesn't involve series, I'm not sure how it will fit into the EViews framework.

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 3:56 pm
by tanghaar
Hm. It does not include time series, but it includes data series/observations. I thought it was irrelevant if it was time series, when it was OLS/NLS. The procedure must be the same?

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 4:05 pm
by EViews Gareth
It isn't that it doesn't include time-series. It is that it doesn't include series objects. Nowhere does your specification reference series objects in your workfile.

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 4:07 pm
by tanghaar
No, but that was because I could not sum them and you said I probably had to do in manually, which I have done now. But with that, I have written all data into the equations instead of EViews getting it from the workfile. So all data is in the equations and from there I want to use NLS to find the 'correct' values of the c's.

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 4:15 pm
by EViews Gareth
I think I'm too confused to be of much help.

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 4:17 pm
by tanghaar
Okay. Ill give it a days rest and see if I can figure something out in R :) Otherwise I might go back here again.

But just last: What did you mean by 'crossed wires' in the case that I want to find and correct the error?

Thanks :)

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 4:25 pm
by startz
Are you trying to sum across series or across observations?

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 4:29 pm
by tanghaar
I guess Im trying to sum across series:
First data point in Y, multiplied with first data point in W, mulitplied .... H, multiplied..... Djr PLUS second data point in Y, mulitplied with Second data poitn in W, .... and so fourth. In other terms:
log(w_j)= a_0 + a_1*log( Sum( Y_r^a_2 * W_r^a_3 * H_r^a_4 * e^(D_j,r * a_5))) , for all r=1,...,78 and j=1,...,78.

If you got an idea, please tell!

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 4:40 pm
by startz
Let's see if I understand. You have 78 locations. You want the dependent variable for location j observation to be a function of variables match independent variables matching location j with location 1, location j with location 2, etc.

Is that it?

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 4:50 pm
by tanghaar
It might be it.

I have one value for the left hand side for region j, with j being 1,2,3,...,78. So a total of 78 equations.

Then I have (for each equation) a constant, a multiple to the log (a(1)*log(.. ) and inside the log parenthesis I take the sum of the product of some data points. However, each equation will at the same places have the same values for income, wage and housing stock. What differs is the distance parameter.

The data points match, so the income in region i (should be at the power of some parameter to be estimated) multiplied with the wage in income i.... multiplied with housing stock in region i... and then the distance between region i and j. Notice the difference of i and j.

In other words: I have 78 regions. What I want is to estimate the wage for all regions, based on their income, the wage per worker, the housing stock and its distance to other regions (the latter is due to an assumption that the closer you are to a 'rich' region the more 'rich' are you yourself). The estimation equation is derived from an economic model, thus its appearance.

Did that and the previous that I have written make any sense? :)

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 5:29 pm
by startz
It might be it.

I have one value for the left hand side for region j, with j being 1,2,3,...,78. So a total of 78 equations.

Then I have (for each equation) a constant, a multiple to the log (a(1)*log(.. ) and inside the log parenthesis I take the sum of the product of some data points. However, each equation will at the same places have the same values for income, wage and housing stock. What differs is the distance parameter.

The data points match, so the income in region i (should be at the power of some parameter to be estimated) multiplied with the wage in income i.... multiplied with housing stock in region i... and then the distance between region i and j. Notice the difference of i and j.

In other words: I have 78 regions. What I want is to estimate the wage for all regions, based on their income, the wage per worker, the housing stock and its distance to other regions (the latter is due to an assumption that the closer you are to a 'rich' region the more 'rich' are you yourself). The estimation equation is derived from an economic model, thus its appearance.

Did that and the previous that I have written make any sense? :)
This is starting to make more sense to me. It sounds like already know the coefficient values you want to use, and your goal is to generate predicted wages. Is that right, or are you trying to estimate coefficient values?

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 5:49 pm
by tanghaar
Thanks for your time, mate :) I'm myself is about to go to bed.. 3 am here. Ill give a short redo of what im trying to do and what data i got. I might have missed explaining the last one.

I got the wage level, total income level and the housing stock in all 78 regions (W, Y, H). Furthermore, I got the distance (in time) from all regions to all the other regions (thus 78*78 distance data points in total, with the time distance between itself being zero).

78 equations, where the left hand side is the log of the wage level in region 1,....,78. You know, basically the equation I have written before. Thus I got all the variables: W, Y, H and the Distance: D_jr. And what I need to estimate is all the c(x)'s.. (or a(x+1)'s). To those, I got relative good guesses, but not the exact values. But for NLS its pretty good to come with some guesses as I understand it, since its an iterative processes. So the better guesses the better regression.

You got any good ideas to either doing the estimation based on the data points or the copy and paste-in the procedure that I tried before (but got 'unmatched parenthesis'-error)?

Thanks :)

Re: Multiequation non-linear least square estimation

Posted: Mon Aug 15, 2011 5:57 pm
by startz
For when you wake up...

This sounds like you want to have ONE equation,with 78 observations. So if your smpl is 1 78, then the left hand side is just log(w).

The right hand side is harder, because for each observation it depends on values from the other observations. It may be that you want to creat your RHS variables outside of EViews. Another possibility is to look at using the @mean function, or something similar, which averages (say distance) across all observations.