Page 2 of 2
Re: Defining derivatives and constrains?
Posted: Thu Oct 18, 2018 9:59 am
by EViews Matt
Hello,
As startz correctly points out, expressing your equation as a list of terms that include coefficients, e.g., w c(1) (@exp(c(2)))*(1/x) (y/x) (z/x), doesn't do what you think it does. Putting the reason aside for a moment, that's why startz recommended that you express the equation as an explicit formula, i.e., w = c(1) + (@exp(c(2)))*(1/x) + (y/x) + (z/x). The @exp(c(2)) subexpression is one way to keep the coefficient of 1/x non-negative, but you can also try c(2)^2 instead. You may also find it useful to examine the graphs of 1/x and w-y/x-z/x to help understand the results of this regression.
Re: Defining derivatives and constrains?
Posted: Thu Oct 18, 2018 8:02 pm
by Simplifier12
Hello,
As startz correctly points out, expressing your equation as a list of terms that include coefficients, e.g., w c(1) (@exp(c(2)))*(1/x) (y/x) (z/x), doesn't do what you think it does. Putting the reason aside for a moment, that's why startz recommended that you express the equation as an explicit formula, i.e., w = c(1) + (@exp(c(2)))*(1/x) + (y/x) + (z/x). The @exp(c(2)) subexpression is one way to keep the coefficient of 1/x non-negative, but you can also try c(2)^2 instead. You may also find it useful to examine the graphs of 1/x and w-y/x-z/x to help understand the results of this regression.
Hello Matt,
Thanks very much for getting back to me with your helpful tips. I tried the explicit formula w = c(1) + (@exp(c(2)))*(1/x) + (y/x) + (z/x). Though the @exp(c2) did not appear in the results table, I got no values for standard error, t-statistic and probability. Also the table shows failure notification for non-zero gradient as you can see below.
I also tried the c(2)^2 hack instead of the @exp(c2). Though the results table notifies of a failure for non-zero gradient, I've got values for standard error, t-statistic and probability fortunately, which is unlike the previous results. But still the coefficient for c(2) is reported negative.
Any thoughts or reckons would be much appreciated.
Thanks.
Re: Defining derivatives and constrains?
Posted: Thu Oct 18, 2018 8:30 pm
by startz
c(2) is negative. c(2)^2 is not.
Re: Defining derivatives and constrains?
Posted: Thu Oct 18, 2018 8:42 pm
by Simplifier12
c(2) is negative. c(2)^2 is not.
Hello Startz,
Thanks for your reply.
Oh you're right. I should calculate c(2)^2 for the primary constant. What about the failure notification of non-zero gradient in the results table, wouldnt it question the robustness or validation of the results?
Also for some sections of my data, I get negative R-squared and high probabilities (even 1.00) in results table. Isnt it an issue?
One more thing, I'm dummy in math and I've read in the other post that I should re-calculate the standard error for the primal constant. Since I'm using the c(2)^2 hack, how can I re-calculate the corresponding standard error? Since I'm doing c(2)^2, shall I do the same, i.e. SD^2?
Re: Defining derivatives and constrains?
Posted: Fri Oct 19, 2018 5:59 am
by startz
c(2) is negative. c(2)^2 is not.
What about the failure notification of non-zero gradient in the results table, wouldnt it question the robustness or validation of the results?
This means that EViews may not have converged to the optimum
Also for some sections of my data, I get negative R-squared and high probabilities (even 1.00) in results table. Isnt it an issue?
I'm not sure what you mean by "some sections of my data. R-squared applies to an entire regression.
One more thing, I'm dummy in math and I've read in the other post that I should re-calculate the standard error for the primal constant. Since I'm using the c(2)^2 hack, how can I re-calculate the corresponding standard error? Since I'm doing c(2)^2, shall I do the same, i.e. SD^2?
Use the coefficients View to test c(2)=0. The standard error will be computed as a side effect.
Re: Defining derivatives and constrains?
Posted: Fri Oct 19, 2018 6:59 am
by Simplifier12
c(2) is negative. c(2)^2 is not.
What about the failure notification of non-zero gradient in the results table, wouldnt it question the robustness or validation of the results?
This means that EViews may not have converged to the optimum
Also for some sections of my data, I get negative R-squared and high probabilities (even 1.00) in results table. Isnt it an issue?
I'm not sure what you mean by "some sections of my data. R-squared applies to an entire regression.
One more thing, I'm dummy in math and I've read in the other post that I should re-calculate the standard error for the primal constant. Since I'm using the c(2)^2 hack, how can I re-calculate the corresponding standard error? Since I'm doing c(2)^2, shall I do the same, i.e. SD^2?
Use the coefficients View to test c(2)=0. The standard error will be computed as a side effect.
I'm not sure what you mean by "some sections of my data. R-squared applies to an entire regression.
My data is for the period 1985-2016. When I run the estimation for example for the time period 2008-2016, I get negative value for R-squared. It also happens for some other time sections in my data.
Use the coefficients View to test c(2)=0. The standard error will be computed as a side effect.
Im not quite sure what it is and how I can find it in the View option.
Re: Defining derivatives and constrains?
Posted: Fri Oct 19, 2018 7:57 am
by startz
View/Coefficient diagnostics/Wald test
If you are getting a negative R^2 from least squares, you might want to post your output.
Re: Defining derivatives and constrains?
Posted: Fri Oct 19, 2018 12:22 pm
by Simplifier12
What about the failure notification of non-zero gradient in the results table, wouldnt it question the robustness or validation of the results?
This means that EViews may not have converged to the optimum
Also for some sections of my data, I get negative R-squared and high probabilities (even 1.00) in results table. Isnt it an issue?
I'm not sure what you mean by "some sections of my data. R-squared applies to an entire regression.
One more thing, I'm dummy in math and I've read in the other post that I should re-calculate the standard error for the primal constant. Since I'm using the c(2)^2 hack, how can I re-calculate the corresponding standard error? Since I'm doing c(2)^2, shall I do the same, i.e. SD^2?
Use the coefficients View to test c(2)=0. The standard error will be computed as a side effect.
I'm not sure what you mean by "some sections of my data. R-squared applies to an entire regression.
My data is for the period 1985-2016. When I run the estimation for example for the time period 2008-2016, I get negative value for R-squared. It also happens for some other time sections in my data.
Use the coefficients View to test c(2)=0. The standard error will be computed as a side effect.
Im not quite sure what it is and how I can find it in the View option.
Thanks.
The results table of the Wald test. But the value for standard error that is now shows is way too high. Many times higher than an individual data.
Also, this is the results table with the negative R-squared.

Re: Defining derivatives and constrains?
Posted: Fri Oct 19, 2018 1:21 pm
by startz
The negative R-squared indicates that the program has not converged to a global optimum. You may want to try different starting values.
More importantly: Estimating 4 parameters with 8 observations is usually pretty hopeless.
Re: Defining derivatives and constrains?
Posted: Fri Oct 19, 2018 1:35 pm
by Simplifier12
The negative R-squared indicates that the program has not converged to a global optimum. You may want to try different starting values.
More importantly: Estimating 4 parameters with 8 observations is usually pretty hopeless.
Oh, I understand. Thanks for the explanation. Will look for how to do the staring values and if it works.