Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

Re: st: execution of the heckman command


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

Diane,

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
Cox

"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.

Best
Daniel

--
HI
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:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index