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: How do I execute the "intreg" command succcessfully?


From   Richard Williams <[email protected]>
To   "[email protected]" <[email protected]>, "[email protected]" <[email protected]>
Subject   Re: st: How do I execute the "intreg" command succcessfully?
Date   Wed, 17 Feb 2010 18:49:04 -0500

At 05:30 PM 2/17/2010, Martin Ryan wrote:
Hi all,

I cannot execute the "intreg" command in Stata, despite my best efforts.

Also, here is the code from the Stata manual. It strikes me as being a little convoluted, and I like my variation using the -recode- command better, but the manual's code also works:

use http://www.stata-press.com/data/r11/womenwage, clear
tab wagecat
by wagecat: keep if _n==1
generate wage1 = wagecat[_n-1]
keep wagecat wage1
save lagwage
use http://www.stata-press.com/data/r11/womenwage
merge m:1 wagecat using lagwage
generate wage2 = wagecat
replace wage2 = . if wagecat == 51
sort age, stable
list wage1 wage2 in 1/10
intreg wage1 wage2 age c.age#c.age nev_mar rural school tenure


One other comment: I don't think the coding of the wagecat var is typical of what you will see in most data sets. wagecat is coded 5, 10, 15, etc., up to 51, i.e. it is coded as the upper value of the interval and 51 = 51 or more. More common, I suspect, is something like

0 = 0 or less
1 = $1 to $5,000
2 = $5,001 to $10,000
3 = $10,001 to $25,000
...
9 = $100,000 or more

Recode commands can easily handle this sort of coding.


-------------------------------------------
Richard Williams, Notre Dame Dept of Sociology
OFFICE: (574)631-6668, (574)631-6463
HOME:   (574)289-5227
EMAIL:  [email protected]
WWW:    http://www.nd.edu/~rwilliam

*
*   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