[Gretl-users] Question - sorting the sample according to one of the observations

Sven Schreiber svetosch at gmx.net
Mon Jan 26 08:26:49 EST 2009


Raz Lev schrieb:
> Hi,
> I am trying to run a Goldfeld-Quandt and to do that I need to sort all
> the observations according to one of the explanatory variables.
> Can someone say how I can do that?
> (I tried running multiple sortby but this is quite labor intensive and
> very very error sensitive)
> 
>

according to a recent hint by Allin (and related to what's in the
cheatsheet chapter of the manual I guess) you could try:

dataset sortby your_x_variable

If the ordering is supposed to be descending, I'm guessing that you
would have to do:

genr sortkey = -your_x_variable
dataset sortby sortkey

no guarantees, but good luck,
sven


More information about the Gretl-users mailing list