Computing an output matrix with NA values

For questions regarding programming in the EViews programming language.

Moderators: EViews Gareth, EViews Moderator, EViews Jason, EViews Matt

marco_15
Posts: 3
Joined: Wed Jan 27, 2010 3:54 am

Computing an output matrix with NA values

Postby marco_15 » Sun Jan 31, 2010 7:46 am

Hi,

I am estimating several equations by OLS, and I want to compute the t-stats of the parameters in a single vector/matrix/table/whatever:

for !i = 1 to 20

matrix(!i,1) output_tstats
output_tstats(!i,1) = equation!i.@tstat(3)

However, some of the t-stats take the values NA as there is a singular matrix. Hence, when computing the output it stops at the first NA warning me with a message like "Not possible to divide by 0".

I tried several coding tricks to still compute the thing, but it doesnt work, the issue remains.

Does anyone has an idea on how to create such a sum-up of t-stats when some are NA? Eviews 4.1 does not seem to know how to deal with it.

Thanks

EViews Gareth
Fe ddaethom, fe welon, fe amcangyfrifon
Posts: 13602
Joined: Tue Sep 16, 2008 5:38 pm

Re: Computing an output matrix with NA values

Postby EViews Gareth » Sun Jan 31, 2010 10:25 am

Don't have a copy of EViews 4.1, but can't you just program around it. Something like:

Code: Select all

if equation!i.@tstat(3) <> NA then output_tstat(!i,1) = equation!i.@tstat(3) endif

marco_15
Posts: 3
Joined: Wed Jan 27, 2010 3:54 am

Re: Computing an output matrix with NA values

Postby marco_15 » Thu Feb 04, 2010 9:38 am

Hi,

Thank you for your reply.

Unfortunately it does not work to program it.

Thx again


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests