Em 24 de fevereiro de 2010 Ulrich <Ulrich.Fritsche(a)wiso.uni-hamburg.de>
escreveu:
I use the „educational attainment and earnings“ data set from Dougherty
(2007) to explain the idea of a logit (or probit) model in the
classroom.
When I moved my files from EViews to gretl, I have difficulties to generate
a dummy for the cases where the value for the variable s is larger than a
certain threshold (let’s say 12) to estimate what Dougherty did with his
“GRAD” variable in the book.
I knew how it worked in Eviews but in gretl I thought the following part of
the help is relevant:
“A tip regarding dummy variables: Suppose x is coded with values 1, 2, or 3
and you want three dummy variables, d1 = 1 if x = 1, 0 otherwise, d2 = 1 if
x = 2, and so on. To create these you can use the commands:
genr d1 = (x=1)
genr d2 = (x=2)
genr d3 = (x=3)”
So I tried “genr dummy = (s>11)”
Did not work out. How can I handle this?
Dear Ulrich, I think Gretl scripts / command are case sensitive, so you need
to use "S". Please try this (it worked for me):
genr dummy = (S>11)
Best,
Henrique C. de Andrade
Doutorando em Economia Aplicada
Universidade Federal do Rio Grande do Sul
www.ufrgs.br/ppge