"^ Function Given Out of Range Argument"
While running non-linear GMM system estimations, eviews will suddenly stop performing the regressions and spits out the error message in quotes. Then it gets stuck and won't estimate systems. I typically have to close out the software and wait (sometimes a day or more) for eviews to start estimating systems again. I know that it is not a problem with the system I am typing in because, when this occurs, I go back and try to estimate previous systems that I have already produced output from. They yield the same error. It's like eviews gets itself stuck and has to "sit" for a prolonged period before working again.
Has anyone had this happen? Any suggestions on how to get things running again without taking a day off?
^ Function Given Out of Range Argument
Moderators: EViews Gareth, EViews Moderator
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13600
- Joined: Tue Sep 16, 2008 5:38 pm
Re: ^ Function Given Out of Range Argument
We'll need more information.
Ideally, could you send us the workfile?
Ideally, could you send us the workfile?
Re: ^ Function Given Out of Range Argument
OK - the workfile is attached.
The system that I am trying to estimate is labeled "TEST_SYSTEM".
Now eviews is also sometimes spitting out a "No valid observations in the equation" error. Again, however, I have previously estimated this system and actually gotten output.
This is the system:
@inst log(y13(-1)/k13(-1)) log(y13(-1)/l13(-1)) log(rp13(-1)) log(wp13(-1))
param c(3) 0.003 c(4) 0.010 c(2) 0.310 c(5) 0.343
log((y13)/(k13))=(1-c(2))*c(1)-c(2)*log(c(5))+c(2)*log(rp13)+(1-c(2))*c(3)*t
log(y13/l13)=(1-c(2))*c(1)-c(2)*log(1-c(5))+c(2)*log(wp13)+(1-c(2))*c(4)*t
log(y13)=c(1)+(c(2)/(c(2)-1))*log(c(5)*((exp(c(3)*(t))*(k13))^((c(2)-1)/c(2)))+(1-c(5))*((exp(c(4)*(t))*(l13))^((c(2)-1)/c(2))))
The same also occurs - on and off, as I described before - for analogous systems using variables labeled 1 through 12 and 14 through 35 in the dataset.
Thank you!
The system that I am trying to estimate is labeled "TEST_SYSTEM".
Now eviews is also sometimes spitting out a "No valid observations in the equation" error. Again, however, I have previously estimated this system and actually gotten output.
This is the system:
@inst log(y13(-1)/k13(-1)) log(y13(-1)/l13(-1)) log(rp13(-1)) log(wp13(-1))
param c(3) 0.003 c(4) 0.010 c(2) 0.310 c(5) 0.343
log((y13)/(k13))=(1-c(2))*c(1)-c(2)*log(c(5))+c(2)*log(rp13)+(1-c(2))*c(3)*t
log(y13/l13)=(1-c(2))*c(1)-c(2)*log(1-c(5))+c(2)*log(wp13)+(1-c(2))*c(4)*t
log(y13)=c(1)+(c(2)/(c(2)-1))*log(c(5)*((exp(c(3)*(t))*(k13))^((c(2)-1)/c(2)))+(1-c(5))*((exp(c(4)*(t))*(l13))^((c(2)-1)/c(2))))
The same also occurs - on and off, as I described before - for analogous systems using variables labeled 1 through 12 and 14 through 35 in the dataset.
Thank you!
- Attachments
-
- normalized system estimation for macroeconomic dynamics revision 07-01-11 - using lagged values as ivs.wf1
- (209.92 KiB) Downloaded 294 times
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: ^ Function Given Out of Range Argument
c(5) is currently negative. You have an evaluation of log(c(5)) in your first equation so that we get missing values for every observation.
The "on and off" that you report is a strong indicator that the problem is starting values. Whenever you estimate an equation by expression we use whatever values are in the coefficient vector as initial coefficient estimates. In cases like yours where there are strong range restrictions you have to be careful to have reasonable values.
By the way, a quick way to see which calculation is giving you problems is to copy-and-paste the equation into the command line with a show (and possibly parentheses if needed). So what I did was to copy from the first equation and enter
in the command line. Once I saw that everything was missing, I looked at where in the expression we might get things evaluating to NAs. The c(5) popped up immediately.
The "on and off" that you report is a strong indicator that the problem is starting values. Whenever you estimate an equation by expression we use whatever values are in the coefficient vector as initial coefficient estimates. In cases like yours where there are strong range restrictions you have to be careful to have reasonable values.
By the way, a quick way to see which calculation is giving you problems is to copy-and-paste the equation into the command line with a show (and possibly parentheses if needed). So what I did was to copy from the first equation and enter
Code: Select all
show (1-c(2))*c(1)-c(2)*log(c(5))+c(2)*log(rp13)+(1-c(2))*c(3)*tRe: ^ Function Given Out of Range Argument
Thank you. This made sense to me BUT, after failing to find a set of initial values (all reasonable) that worked, I tried estimating the system with a number for c(5) plugged in. For example,
@inst log(y1(-1)/k1(-1)) log(y1(-1)/l1(-1)) log(rp1(-1)) log(wp1(-1))
param c(3) 0.019 c(4) 0.030 c(2) 0.009
log((y1)/(k1))=(1-c(2))*c(1)-c(2)*log(0.502)+c(2)*log(rp1)+(1-c(2))*c(3)*t
log(y1/l1)=(1-c(2))*c(1)-c(2)*log(1-0.502)+c(2)*log(wp1)+(1-c(2))*c(4)*t
log(y1)=c(1)+(c(2)/(c(2)-1))*log(0.502*((exp(c(3)*(t))*(k1))^((c(2)-1)/c(2)))+(1-0.502)*((exp(c(4)*(t))*(l1))^((c(2)-1)/c(2))))
Again, I am again getting the same error message. All of the data (y1, k1, rp1, wp1, l1, t) have all positive values; exp(...) cannot be non-positive by definition (being a positive number raised to a power); 0.502 and 1- 0.502 are both positive. Something else is going wrong with the software. Any ideas?
Thank you for your patience.
@inst log(y1(-1)/k1(-1)) log(y1(-1)/l1(-1)) log(rp1(-1)) log(wp1(-1))
param c(3) 0.019 c(4) 0.030 c(2) 0.009
log((y1)/(k1))=(1-c(2))*c(1)-c(2)*log(0.502)+c(2)*log(rp1)+(1-c(2))*c(3)*t
log(y1/l1)=(1-c(2))*c(1)-c(2)*log(1-0.502)+c(2)*log(wp1)+(1-c(2))*c(4)*t
log(y1)=c(1)+(c(2)/(c(2)-1))*log(0.502*((exp(c(3)*(t))*(k1))^((c(2)-1)/c(2)))+(1-0.502)*((exp(c(4)*(t))*(l1))^((c(2)-1)/c(2))))
Again, I am again getting the same error message. All of the data (y1, k1, rp1, wp1, l1, t) have all positive values; exp(...) cannot be non-positive by definition (being a positive number raised to a power); 0.502 and 1- 0.502 are both positive. Something else is going wrong with the software. Any ideas?
Thank you for your patience.
-
EViews Glenn
- EViews Developer
- Posts: 2682
- Joined: Wed Oct 15, 2008 9:17 am
Re: ^ Function Given Out of Range Argument
One should be careful about saying that something is going wrong with a piece of software before carefully examining what might be going on in one's own specification.
Taking your new specification and following my earlier suggestion of taking the parts of the system and evaluating them, I quickly determined that the expression
is generating all NA values. So there is something going on in this equation. I then took the two inside parts of the expression
and
evaluated them, and determined that they were all zero values. This is the source of the problem since we can't take logs of zero.
Now we can quickly determine (C(2)-1)/C(2) is equal to -110.111 at starting values, so you are taking the remaining exponential term product and raising it to a very large negative power.
The term
has terms in the range of 10,000 to 23,000 which, when raised to the large negative power, yield numbers indistinguishable from zero. The real problem is that L1 has values in the range 10,000 to 60,000 (c(4)*t are in the single digits).
So the problem is still starting values since it is impossible to evaluate your objective function at your starting values. You might want to start C(2) where the fraction (C(2)-1)/C(2) isn't so large. But take care to note that C(4) is not identified when C(2)=1.
Taking your new specification and following my earlier suggestion of taking the parts of the system and evaluating them, I quickly determined that the expression
Code: Select all
log(0.502*((exp(c(3)*(t))*(k1))^((c(2)-1)/c(2)))+(1-0.502)*((exp(c(4)*(t))*(l1))^((c(2)-1)/c(2))))Code: Select all
0.502*((exp(c(4)*(t))*(l1))^((c(2)-1)/c(2)))Code: Select all
(1-0.502)*((exp(c(4)*(t))*(l1))^((c(2)-1)/c(2)))Now we can quickly determine (C(2)-1)/C(2) is equal to -110.111 at starting values, so you are taking the remaining exponential term product and raising it to a very large negative power.
The term
Code: Select all
exp(c(4)*(t))*(l1)So the problem is still starting values since it is impossible to evaluate your objective function at your starting values. You might want to start C(2) where the fraction (C(2)-1)/C(2) isn't so large. But take care to note that C(4) is not identified when C(2)=1.
Who is online
Users browsing this forum: No registered users and 2 guests
