How do I get the obs date/number for a specific obs
Posted: Wed Sep 11, 2013 10:20 am
by abossie
I want to get the observation date for the median of one series and then extract the value of a second series on that date. Not sure how to do that.
Thanks.
Re: How do I get the obs date/number for a specific obs
Posted: Wed Sep 11, 2013 10:21 am
by abossie
Oh I'm using Eviews 7.2.
Re: How do I get the obs date/number for a specific obs
Posted: Wed Sep 11, 2013 11:20 am
by startz
Remember that there isn't necessarily any observation that exactly equals the median for a series, as in the observations 1, 2, where the median is 1.5, or that there may be multiple observations that equal the median, as in 1, 2,2,2,2.
Re: How do I get the obs date/number for a specific obs
Posted: Wed Sep 11, 2013 11:31 am
by EViews Gareth
But assuming that the observation does exist, and is unique,
Code: Select all
smpl if x=@median(x)
scalar val = @max(y)