for example, i have a series: {1,1,2,3,4,5,6,6}
the observation number of this series is 8, which I think can be retrieved by the function of @obs
but the number of different variables in this series is 6
how to achieve the second purpose by the functions in eview?
Thanks in advance !!!
how to calculte the number of different obs in a series
Moderators: EViews Gareth, EViews Steve, EViews Moderator, EViews Jason
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to calculte the number of different obs in a series
Open the series, and then choose View->One Way Tabulation.
Re: how to calculte the number of different obs in a series
hey thanks for answering!Open the series, and then choose View->One Way Tabulation.
how one way tabulation can cont the different numbers in a series?
and i have so many series to do this manipulation
so do you know how to run this count by evews functions?
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to calculte the number of different obs in a series
There is no function that will return the number of unique values in a series. You can easily see the number of unique values with a one-way tabulation, though.
To perform one-way tabulation in a program, you can use series.freq
To perform one-way tabulation in a program, you can use series.freq
Re: how to calculte the number of different obs in a series
hi,There is no function that will return the number of unique values in a series. You can easily see the number of unique values with a one-way tabulation, though.
To perform one-way tabulation in a program, you can use series.freq
i see how to use one way tabulation to count unique number now
can you tell me how to conduct such operation by functions?
I think there would be a function if i can use it by clicking mouse
Re: how to calculte the number of different obs in a series
or can you figure out a code to solve my problem?There is no function that will return the number of unique values in a series. You can easily see the number of unique values with a one-way tabulation, though.
To perform one-way tabulation in a program, you can use series.freq
thanks in advance!!
-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to calculte the number of different obs in a series
To perform one-way tabulation in a program, you can use series.freq
-
CharlieEVIEWS
- Posts: 202
- Joined: Tue Jul 17, 2012 9:47 am
Re: how to calculte the number of different obs in a series
Lot of views on this thread so I thought I'd post:
Should do the trick. Works for alphas too.
Code: Select all
freeze(seriesfreq) myseries.freq
scalar numberunique = @val(@mid(seriesfreq(5,1),22))-
EViews Gareth
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13603
- Joined: Tue Sep 16, 2008 5:38 pm
Re: how to calculte the number of different obs in a series
Since this thread was originally posted, the @uniquevals function was added to EViews. Much easier to use that programmatically.
-
CharlieEVIEWS
- Posts: 202
- Joined: Tue Jul 17, 2012 9:47 am
Re: how to calculte the number of different obs in a series
i need there to be a ::facepalm:: smilie. still might come in useful for somebody one day though.
Who is online
Users browsing this forum: No registered users and 2 guests
