Page 1 of 3
Removing NA values from a series in the workfile
Posted: Mon Oct 18, 2010 2:20 pm
by mectricsdonk
Dear dear econometric fanatics :series:
{using Eviews 6}
I was wondering how I could remove the NA values (at irregular and regular dates; bank holidays + weekends) from my financial time series, as I'm not able to estimate a garch model with a discontinuous series.
I went through the help file, saying that I should leave those days out. It unfortunately didn't tell me how to do so in eviews.
kind regards :eviews6:
Re: Removing NA values from a series in the workfile
Posted: Mon Oct 18, 2010 2:36 pm
by EViews Gareth
Proc->Contract Current Page
then set the sample to "if X<>NA" where X is the series with the NAs.
Re: Removing NA values from a series in the workfile
Posted: Mon Oct 18, 2010 2:50 pm
by mectricsdonk
Thank you very much

Re: Removing NA values from a series in the workfile
Posted: Wed Dec 08, 2010 1:02 pm
by theolvs
hello guys! i have a problem.
i want to count how many times some values from the rows of a matrix are over a threshold that i set (its standard deviation). the problem is that i have na values in the matrix and so eviews5 gives me this error message "NA found in matrix in IF VK>VKK then"
the program is:
smpl @all
series yt
group g1
'for !j=1 to 189
'g1.add dser{!j}_sa
'next
sample s0 1989m2 2010m10
stomna(ainflsa,m_ainflsa,s0)
vector(261) v_stdev
for !i=1 to 261
vector v{!i}=@rowextract(m_ainflsa, !i)
v_stdev(!i)=@stdev( @transpose(v{!i}) )
next
mtos(v_stdev,s_stdev,s0)
'delete m_ainflsa v_stdev
smpl @all
series yt=0
for !j=1 to 261
smpl @first+!j @first+!j
!k=0
for !i=1 to 189
vector(1) vk=@abs(m_ainflsa(!j,!i))
vector(1) vkk=v_stdev(!j)
if vk>vkk then
!k=!k+1
endif
next
yt=!k
next
can you help me?how can i omit the na values from this process?
Removing NA values from a series in the workfile
Posted: Wed Dec 08, 2010 1:13 pm
by EViews Gareth
Check whether the values are NAs first :D
Re: Removing NA values from a series in the workfile
Posted: Wed Dec 08, 2010 4:03 pm
by theolvs
yes they are..and NAs are a lot.
Re: Removing NA values from a series in the workfile
Posted: Wed Dec 08, 2010 4:10 pm
by EViews Gareth
I think you misunderstood my statement.
Currently you have:
I'm saying you should do this:
Code: Select all
if vk<>na and vkk<>na then
if vk > vkk then
Re: Removing NA values from a series in the workfile
Posted: Thu Dec 09, 2010 2:18 am
by theolvs
thanks a lot my friend!!indeed i misunderstood your statement before... i ll test the command you gave me today and i ll report back!! :D
Re: Removing NA values from a series in the workfile
Posted: Tue Aug 16, 2011 1:33 pm
by mwu888
How does one remove NAs in a data series in Eviews 7.2?
Removing NA values from a series in the workfile
Posted: Tue Aug 16, 2011 1:54 pm
by EViews Gareth
Could you define what you mean by that?
Do you want to remove them from the workfile? From the sample? Or map them into different values?
Re: Removing NA values from a series in the workfile
Posted: Wed Aug 17, 2011 5:34 am
by mwu888
I want to remove the NAs in the series I imported from Excel. Can I create a new series that excludes the NAs? How is this done in Eviews 7.2?
Re: Removing NA values from a series in the workfile
Posted: Mon Aug 29, 2011 4:42 pm
by EViews Glenn
You can always avoid using observations with NA in them by letting EViews handle them, or if necessary, setting a sample condition. Generally, you shouldn't need to "remove" observations permanently. If I'm understanding correctly, that is what you want to do. In that case, you can do a workfile extract.
From the workfile window,
Proc/Copy Extract from Current Page (you can answer the resulting prompt by choosing to do either by link or value), and specify the condtion that your series isn't NA as in
which will remove all observations where Y=NA. Note that this will shorten ALL of the series copied or linked into the new page. You can't have series of unequal lengths in a workfile.
Re: Removing NA values from a series in the workfile
Posted: Sat Sep 24, 2011 12:31 pm
by Walio
And how to map the NAs into different values?
_______________
iphone application development
Re: Removing NA values from a series in the workfile
Posted: Sat Sep 24, 2011 1:47 pm
by startz
series y =@recode(x=na,2.71828,x)
Re: Removing NA values from a series in the workfile
Posted: Thu Mar 15, 2012 9:59 am
by deepaib
Hi,
It is suggested to use condition @all if y<>na to avoid obs with NA. I have 50 series to be contracted that way. Is it possible to do all at once by condition or by programming.
Thank you.