Hello,
I have some questions about using the By-Group statistics functions, specifically @meansby(arg1,arg2[,s]). I understand the first argument is the series you want to average. But what is arg2?
From the documentation, I assume you have to create a group for arg2, where the series in the group defines the unique by-groups of observations you're trying to average over (the group excludes the arg1 series, right?).
Yet, when I try this, the function only averages over observations who share a common value in the first series of the group, not over observations who share common values for all three of the series in my group. Note that I'm using an alpha series and two numerical series to define my by-groups.
In Eviews code, here's what I'm trying to do:
group bygrp series1 alpha2 series3
genr testvar = @meansby(series0,bygrp)
I've sorted the workfile in ascending order by the series1, alpha2, and series3 in my group. Also, I'm not using any specific sample for [,s].
What am I doing wrong?
By-group statistics
Moderators: EViews Gareth, EViews Jason, EViews Steve, EViews Moderator
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Re: By-group statistics
The by statistics will only classify by a single series. Thus arg2 should be entered as a series name. If you enter a group name, EViews will simply use the first series in that group.
Follow us on Twitter @IHSEViews
Re: By-group statistics
Thanks Gareth,
I see in the documentation now that "arg2 is a numeric or alpha series expression identifying the subgroups." I guess I overlooked that statement and assumed that you needed to use group objects for by-group statistics.
It would be nice in future versions of Eviews to have the ability to calculate statistics using subgroups identified by more than one series.
I'll experiment with trying to do this using some more complex coding.
I see in the documentation now that "arg2 is a numeric or alpha series expression identifying the subgroups." I guess I overlooked that statement and assumed that you needed to use group objects for by-group statistics.
It would be nice in future versions of Eviews to have the ability to calculate statistics using subgroups identified by more than one series.
I'll experiment with trying to do this using some more complex coding.
-
- Fe ddaethom, fe welon, fe amcangyfrifon
- Posts: 13323
- Joined: Tue Sep 16, 2008 5:38 pm
Who is online
Users browsing this forum: No registered users and 12 guests