Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, is already up and running.

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: execution of the heckman command

From   daniel klein <>
Subject   Re: st: execution of the heckman command
Date   Wed, 7 Dec 2011 00:46:42 +0100


if your mail is properly formated, your problem is in the following lines:

*/hhsize femalehh wealth2 wealth3 wealth4 wealth5 mprim msechigher
mnotworking; /*
select(hv110  hv105 hv1052 male urban foothill mountain kids5 /*

Options are separated from commands using a comma. In your code the
-heckman- command ends in the first line. Change the ";" to "," in
this line, get rid of all "*/" and  "/*" (or alternatively do not set
the delimiter, see remarks below) and your code should work.

As a side issue, I quote from the excellent essay "Suggestions on
Stata programming style" (Stata Journal 5(4) 2005, 560-566) by Nick

"Use #delimit ; sparingly (Stata is not C): commenting out ends of
lines is tidier
where possible (although admittedly still ugly). The /// comment introduced in
Stata 8 is most helpful here and is arguably more pleasing visually than /* */."

I would like to add, that you sure do not want to mix -delimit- (i.e.
";") with "/**/", as one of them is unnecessary and it makes your code
hard to read.


I have run these models before and had success but can no longer do this.
I have checked the reference manuals to make sure I have the correct y
variables in the different commands.
My commands are as follows [...]
*   For searches and help try:

© Copyright 1996–2015 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index