Hi
since last week i have started using eviews and this forum has been very helpful to me. My problem is that i have a return series for exchange rates and i have removed the 2.5% lowest and 2.5% highest observations as outliers. However, doing so, I can no longer see the dates attached to the observations in the leftmost column. Instead, its only numbering the observations. Now to consider the day of the week effect, I really need these dates to generate my dummy variables. Can someone please help me?
Thanks.
how to keep the date attached to each observation
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: how to keep the date attached to each observation
It's hard to say what happened when you removed observations unless you tell us more specifically what you did.
You might simple use a smpl statement to prevent observations from being processed rather than removing them. That way the dates don't change.
You might simple use a smpl statement to prevent observations from being processed rather than removing them. That way the dates don't change.
Re: how to keep the date attached to each observation
What I did was remove the 2.5% lowest and 2.5% highest observations from the return series. To carry out garch estimation, the sample must be continuous. Thats why I had to remove the outliers which was labelled NA. To remove the outliers, I did the following:
proc => contract current page
and I set the sample to
if X<>NA
where X is the series with the NAs.
it is only after doing this that the dates disappear.
Its from this data that I want to study the week of the day effect, i.e. without the outliers.
proc => contract current page
and I set the sample to
if X<>NA
where X is the series with the NAs.
it is only after doing this that the dates disappear.
Its from this data that I want to study the week of the day effect, i.e. without the outliers.
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to keep the date attached to each observation
Which version of EViews? When I do what you suggest, EViews keeps the dates fine:
Code: Select all
create d5 1990 2000
series x=nrnd
smpl if rnd>0.8
x = na
smpl @all
pagecontract if x<>na
Re: how to keep the date attached to each observation
sorry... its day of the week effect, not week of the day... :)
-
startz
- Non-normality and collinearity are NOT problems!
- Posts: 3797
- Joined: Wed Sep 17, 2008 2:25 pm
Re: how to keep the date attached to each observation
You're right that the smpl by itself won't work. You will need to follow Gareth's suggestion. (Which works for me too.)
Re: how to keep the date attached to each observation
i am using eviews6. your codes work fine for me too. I think that my mistake is that i am creating a new series using the following
series outlier1=@recode(returns>@quantile(returns, 0.025) and returns<@quantile(returns, 0.975), returns, na)
instead of creating a sample. However if i create a sample using
smpl if returns>@quantile(returns, 0.025) and returns<@quantile(returns, 0.975)
I cant seem to set the outliers to NA :s
I am attaching my workfile as well. I hope you can help me.
Thanks
series outlier1=@recode(returns>@quantile(returns, 0.025) and returns<@quantile(returns, 0.975), returns, na)
instead of creating a sample. However if i create a sample using
smpl if returns>@quantile(returns, 0.025) and returns<@quantile(returns, 0.975)
I cant seem to set the outliers to NA :s
I am attaching my workfile as well. I hope you can help me.
Thanks
- Attachments
-
- usd-dates.WF1
- (112.79 KiB) Downloaded 351 times
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to keep the date attached to each observation
I'm on my phone, so can't check your file, but what happens if you simply do:
Code: Select all
Pagecontract if returns>@quantile(returns, 0.025) and returns<@quantile(returns, 0.975)
Re: how to keep the date attached to each observation
Its similar to what I did initially. The dates disappear leaving only the observation number. :(
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to keep the date attached to each observation
It may be that we improved the behaviour in EViews 7. I can check with EViews 6 tomorrow when I'm in the office.
In the mean time, it may be that you can get it to put the dates back in, by manually changing the page structure (proc->structure/resize current page), and then saying it is "dated specified by date series", and entering the name of the date series (obsid?)
In the mean time, it may be that you can get it to put the dates back in, by manually changing the page structure (proc->structure/resize current page), and then saying it is "dated specified by date series", and entering the name of the date series (obsid?)
Re: how to keep the date attached to each observation
I retried the following code you suggested
Pagecontract if returns>@quantile(returns, 0.025) and returns<@quantile(returns, 0.975)
i dont know what went wrong earlier but it seems to be working now.
Thanks loadsss for your precious time, replying back so soon, especially on a Sunday :)
Pagecontract if returns>@quantile(returns, 0.025) and returns<@quantile(returns, 0.975)
i dont know what went wrong earlier but it seems to be working now.
Thanks loadsss for your precious time, replying back so soon, especially on a Sunday :)
Who is online
Users browsing this forum: No registered users and 2 guests
