Hi,
I vote for the series (and scalar) version. It removes any doubts of what is
meant to do.
Seems that genr is very powerful deciding for us the correct datatype.
Best Regards and thank you for your book,
Helio
On Wed, Jul 27, 2011 at 9:55 PM, Lee Adkins <lee.adkins(a)okstate.edu> wrote:
Hi all,
What is the preferred use of these in hansl? I've started using scalar
for all scalar computations (but in any old code I used genr); sometimes I
use series instead of genr to generate new variables. I do realize that
series will generate a series from a scalar.
For instance, which is the preferred usage:
open engel
set seed 3213789
loop 100 --progressive --quiet
series u = normal(0,88)
series y1= 80+10*income+u
ols y1 const income
endloop
or
open engel
set seed 3213789
loop 100 --progressive --quiet
genr u = normal(0,88)
genr y1= 80+10*income+u
ols y1 const income
endloop
also suppose I want to print or store a scalar, which of these is
preferred way to generate the scalar?
scalar b = $coeff(income)
genr b = $coeff(income)
I'm trying to finish the updated version of my gretl book and my code needs
some tidying up. Looking at it now, it is pretty much a mess. It seems
I've mixed the usage of these up throughout and I'd like to know the
preferred way before I hack my way back through a thousand lines of code
.....
Thanks,
Lee
--
Lee Adkins
Professor of Economics
lee.adkins(a)okstate.edu
learneconometrics.com
_______________________________________________
Gretl-users mailing list
Gretl-users(a)lists.wfu.edu
http://lists.wfu.edu/mailman/listinfo/gretl-users