Page 1 of 1

How to write NA in relevant column of matrix when Grid Search estimation error occurs

Posted: Sun Apr 23, 2017 11:18 pm
by acemi
Hello,

I wrote a simple routine for my nonlinear regression estimation so as to conduct a search within possible values of coefficient starting values.
For every grid of possible values of 5 coefficients, NLS estimation in done. Then starting values and converged estimation coefficient results are written in a matrix row.

My problem is I could not instruct eviews to write 'NA' or any other text or maybe even just ' ' (blank) into relevant row of matrix when theres an estimation error. Instead, eviews stops and displays error message such as :

Insufficient number of observations in "EQUATION NLS.LS LOG(Y) = (((1-EXP(-C(1)*@TREND))*C(2)*(1-C(3))*LOG(S))+((1-EXP(-C(1)*@TREND))*C(5)*LOG(L))+((1-EXP(-C(1)*@TREND))*C(4)*LOG(FDI))+((1-EXP(-C(1)*@TREND))*LOG(GAMMA+(1-C(2))*C(5)*N))+((1-EXP(-C(1)*@TREND))*C(2)*(1-C(3))*LOG((N+DELTA)+(C(5)*N)))+((EXP(-C(1)*@TREND))*LOG(Y(-1))))".
NLS is not defined in "!CO1=NLS.@COEFS(1)".
NLS is not defined in "!CO2=NLS.@COEFS(2)".

where !CO2 is variable defined to contain estimated nls coefficient 2 for example. NLS is the equation label for nonlinear estimation.

Would very much appreciate any clues on this issue..
Many thanks in advance.
Best regards

Re: How to write NA in relevant column of matrix when Grid Search estimation error occurs

Posted: Sun Apr 23, 2017 11:23 pm
by EViews Gareth
Use @errorcount and if conditions to skip the equations that do not estimate