[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
Re: st: hireg help
At 10:15 AM 5/18/2007, Austin Nichols wrote:
After fiddling around I think I see the problem. I created some fake
data and Megan's command worked fine in Stata 9.2 but I replicated
her problem in Stata 8.2. It turns out that in Stata 9.2., string
expressions can be 244 characters long, but in some versions of 8.2
they can only be 80 characters long. Megan's independent variable
list was therefore getting truncated just before she got to the last
3 vars. The fact that "ortho" was included twice in her var list
didn't help any either.
After a quick look, -hireg- seems to have some minor mistakes in the
code--e.g. it reports obs not used when option -nomiss- is specified
without reference to [if] and [in] restrictions--but I cannot easily
see the source of your reported error.
One solution would be to use Austin's hireg2, and another would be to
shorten the variable names. If you want to patch a copy of the
original hireg (rename it hireg2 or something like that like Austin
did), I think all you need to do is look for the lines
local v = "`v' `1'"
local vn = "`1'"
local vv = "`vv',`vn'"
local vl = " `vl' `1'"
and delete the equals signs, i.e. change the lines to
local v "`v' `1'"
local vn "`1'"
local vv "`vv',`vn'"
local vl " `vl' `1'"
Incidentally, I would always use the nomiss option with
hireg. Otherwise you could be comparing models estimated with different cases.
I don't know if Paul Bern is on Statalist. I'll try to email him about this.
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
* For searches and help try: