Dear Allin,

Thank you for the answer. With the condition you'd suggested my problem is
solved!

Best,
Henrique


2009/10/31 Allin Cottrell <cottrell(a)wfu.edu>

>
> On Sat, 31 Oct 2009, Henrique wrote:
>
> > The theory tells me that  b[2] < 0 and b[3] > 0 and I estimate "n"
> models,
> >
> > Model 1: Y = b[1] + b[2]*X1 +b[3]*Z1
> > Model 2: Y = b[1] + b[2]*X2 +b[3]*Z2
> > .
> > .
> > .
> > Model n: Y = b[1] + b[2]*Xn +b[3]*Zn
> >
> > Now I would like to know if it is possible to obtain a list with the
> > models where the estimated parameters follow the theory (i.e. b[2] < 0
> > and b[3] > 0).
>
> You can't create a list of models as such, in gretl, but you have
> the condition
>
> if $coeff[2] < 0 && $coeff[3] > 0
>  # do something
> endif
>
> The "something" might be saving the model specification as a
> string, or saving the ID numbers of the X and Z series as
> a row of a matrix, or (in the GUI) re-running the estimation
> command so as to save a named model, as in
>
> model$i <- ols ...
>
> Allin Cottrell
> _______________________________________________
> Gretl-users mailing list
> Gretl-users(a)lists.wfu.edu
> http://lists.wfu.edu/mailman/listinfo/gretl-users
>
Dear Allin,

Thank you for the answer. With the condition you'd suggested my problem is solved!

Best,
Henrique


2009/10/31 Allin Cottrell <cottr...@wfu.edu>

On Sat, 31 Oct 2009, Henrique wrote:

> The theory tells me that  b[2] < 0 and b[3] > 0 and I estimate "n" models,
>
> Model 1: Y = b[1] + b[2]*X1 +b[3]*Z1
> Model 2: Y = b[1] + b[2]*X2 +b[3]*Z2
> .
> .
> .
> Model n: Y = b[1] + b[2]*Xn +b[3]*Zn
>
> Now I would like to know if it is possible to obtain a list with the
> models where the estimated parameters follow the theory (i.e. b[2] < 0
> and b[3] > 0).

You can't create a list of models as such, in gretl, but you have
the condition

if $coeff[2] < 0 && $coeff[3] > 0
 # do something
endif

The "something" might be saving the model specification as a
string, or saving the ID numbers of the X and Z series as
a row of a matrix, or (in the GUI) re-running the estimation
command so as to save a named model, as in

model$i <- ols ...

Allin Cottrell
_______________________________________________
Gretl-users mailing list
gretl-us...@lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users

Reply via email to