This what I did before your fist message.
It uses unnecessary sorting since I still
not good with all options of 'smpl'
I tested it by calling R-session and
using gqtest{lmtest}
Oleh
P.S. Actually I was not interesting in GQ results
but in good using of 'smpl'

21 грудня 2015, 20:59:11, від "Riccardo (Jack) Lucchetti" <r.lucchetti@univpm.it>:

On Mon, 21 Dec 2015, oleg_komashko@ukr.net wrote:

> Dear Riccardo, 1) incredibly useful example for smpl! Thanks 

Maybe. Except that, now that I look at it again, it's all wrong! :D

(the 2nd "ols" command should come straight after the "smpl" command, 
otherwise "den" and "df1" come from the full-sample ols)


-------------------------------------------------------
   Riccardo (Jack) Lucchetti
   Dipartimento di Scienze Economiche e Sociali (DiSES)

   Università Politecnica delle Marche
   (formerly known as Università di Ancona)

   r.lucchetti@univpm.it
   http://www2.econ.univpm.it/servizi/hpp/lucchetti
-------------------------------------------------------