Ang. Re: [Gretl-devel] Regarding the dataset command (Was:
Featurerequestfor sorting of variables)
Ignacio Diaz-Emparanza
ignacio.diaz-emparanza at ehu.es
Thu Oct 4 05:22:20 EDT 2007
On Thursday 04 October 2007 10:34:10 andreas.rosenblad at ltv.se wrote:
> ignacio.diaz-emparanza at ehu.es @ INTERNET skrev 2007-10-04 10:09:23 :
> > On Thursday 04 October 2007 08:56:23 andreas.rosenblad at ltv.se wrote:
> > > Could you also add another option under the "dataset" command, e.g.
> > > "dataset deleteobs <parameter>", where e.g. "dataset deleteobs 3, 5,
>
> 11-22"
>
> > > would delete observations 3, 5 and 11-22 from the data set (i.e. from
>
> all
>
> > > variables in the data set) and "dataset deleteobs x>0" would delete all
> > > observations where x>0 from the dataset.
> >
> > I think the 'smpl' command maybe used in the form you need. For example,
> > to work with all observations except 3,5 and 11-22 you may use
> >
> > smpl (obs<11 || obs>22) && obs!=3 && obs!=5 --restrict
>
> But I want to delete the observations, not just restrict the analysis to
> some observations.
>
Well, I don't know how to do that directly in the gretl main window, but you
can do what you want saving the data in a file:
smpl (obs<11 || obs>22) && obs!=3 && obs!=5 --restrict
store blabla.gdt
open blabla.gdt
--
Ignacio Diaz-Emparanza
DEPARTAMENTO DE ECONOMÍA APLICADA III (ECONOMETRÍA Y ESTADÍSTICA)
UPV/EHU
Avda. Lehendakari Aguirre, 83 | 48015 BILBAO
T.: +34 946013732 | F.: +34 946013754
www.et.bs.ehu.es
More information about the Gretl-devel
mailing list