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
How to write NA in relevant column of matrix when Grid Search estimation error occurs
Moderators: EViews Gareth, EViews Jason, EViews Moderator, EViews Matt
How to write NA in relevant column of matrix when Grid Search estimation error occurs
- Attachments
-
- model data_pennworld_oecd stat_fdidata.wf1
- (2.41 MiB) Downloaded 204 times
-
- fdi_simul.prg
- (1.2 KiB) Downloaded 242 times
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13319
- Joined: Tue Sep 16, 2008 5:38 pm
Re: How to write NA in relevant column of matrix when Grid Search estimation error occurs
Use @errorcount and if conditions to skip the equations that do not estimate
Follow us on Twitter @IHSEViews
Who is online
Users browsing this forum: No registered users and 32 guests