By-group statistics
Posted: Wed Jan 07, 2009 10:29 am
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?
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?