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@okstate.edu

learneconometrics.com