How do I get the obs date/number for a specific obs

For questions regarding programming in the EViews programming language.

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

abossie
Posts: 15
Joined: Tue Jan 31, 2012 10:54 am

How do I get the obs date/number for a specific obs

Postby abossie » Wed Sep 11, 2013 10:20 am

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.

abossie
Posts: 15
Joined: Tue Jan 31, 2012 10:54 am

Re: How do I get the obs date/number for a specific obs

Postby abossie » Wed Sep 11, 2013 10:21 am

Oh I'm using Eviews 7.2.

startz
Non-normality and collinearity are NOT problems!
Posts: 3796
Joined: Wed Sep 17, 2008 2:25 pm

Re: How do I get the obs date/number for a specific obs

Postby startz » Wed Sep 11, 2013 11:20 am

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.

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

Re: How do I get the obs date/number for a specific obs

Postby EViews Gareth » Wed Sep 11, 2013 11:31 am

But assuming that the observation does exist, and is unique,

Code: Select all

smpl if x=@median(x) scalar val = @max(y)


Return to “Programming”

Who is online

Users browsing this forum: No registered users and 2 guests