Dear Ignacio, thanks a lot for your help. The script worked just like a
charm :)
Um abraço,
Henrique
2011/1/5 Ignacio Diaz-Emparanza <ignacio.diaz-emparanza(a)ehu.es>
El 04/01/11 22:13, Henrique Andrade escribió:
> Dear Gretl Community,
>
> I'm trying to estimate several models and save only the models that
> show the correct signs on the estimated parameters.
>
> Something like this:
>
> open australia.gdt
> ols le const lpau lpus
> if b[2]>0 & b[3]<0
> "Model 1" <- ols le const lpau lpus
> else
> "do notnhing"
> endif
>
> Is this possible?
>
> Best regards,
> Henrique
Yes, ¿may be this works for you?:
<script>
open australia.gdt
ols le const lpau lpus
b=$coeff
if (b[2]>0 && b[3]<0)
"Model 1" <- ols le const lpau lpus
else
print "do nothing"
end if
</script>
--
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.ea3.ehu.es
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users
--
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge