On Fri, 31 May 2019, Fred Engst wrote:
#5: The sorting issue is only true in the famous mroz dataset that is
used by both Wooldridge’s “Introductory Econometrics A Modern Approach"
textbook and HIll-Grifit-Lim’s “Principles of Econometrics" textbook.
However, I’ve just confirmed, only the one “mroz.gdt" downloaded from
Wooldridge’s datalink
https://sourceforge.net/projects/gretl/files/datafiles/wooldridge.tar.gz/...
<
https://sourceforge.net/projects/gretl/files/datafiles/wooldridge.tar.gz/...
seems to have this problem, sorting by wage or lwage have the same
results. The one downloaded from POE’s don’t.
Uhm, funny. I can't reproduce this. This is what I just tried (after
downloading the dataset form sourceforge and storing the gdt file into a
temporary dir):
<hansl>
set verbose off
open /tmp/mroz.gdt --quiet
series orig_order = time
scalar check = ( min(diff(wage)) >= 0 ) && ( min(diff(lwage)) >= 0 )
printf "check: %d (unsorted: should be 0)\n", check
dataset sortby wage
scalar check = ( min(diff(wage)) >= 0 ) && ( min(diff(lwage)) >= 0 )
printf "check: %d (sorted by wage: should be 1)\n", check
dataset sortby lwage
scalar check = ( min(diff(wage)) >= 0 ) && ( min(diff(lwage)) >= 0 )
printf "check: %d (sorted by lwage: should be 1)\n", check
dataset sortby orig_order
scalar check = ( min(diff(wage)) >= 0 ) && ( min(diff(lwage)) >= 0 )
printf "check: %d (back to original: should be 0)\n", check
</hansl>
Could you please try this script?
-------------------------------------------------------
Riccardo (Jack) Lucchetti
Dipartimento di Scienze Economiche e Sociali (DiSES)
Università Politecnica delle Marche
(formerly known as Università di Ancona)
r.lucchetti(a)univpm.it
http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------