Stata The Stata listserver
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

RE: st: Defining observation specific truncation points with truncreg


From   Eric Sevigny <[email protected]>
To   [email protected]
Subject   RE: st: Defining observation specific truncation points with truncreg
Date   Fri, 01 Oct 2004 10:17:53 -0400

This was helpful. Thanks! In hindsight, the answer to my question was kind of intuitive. Just code the truncation value into trunc for each stratification of interest (in my case year). For some reason, this solution eluded me as I was formulating my analyses. Thanks again.

Eric

--On Thursday, September 30, 2004 10:29 PM -0500 Scott Merryman <[email protected]> wrote:r


Suppose, in the auto dataset, domestic observations are truncated at 17
while foreign observations are truncated at 18. I believe you could do the
following:


. sysuse auto
(1978 Automobile Data)

. gen trunc = cond(foreign == 0,17, 18)

. truncreg mpg price, ll(trunc) nolog
(note: 20 obs. truncated)

Truncated regression
Limit:   lower =      trunc                             Number of obs =
54
         upper =       +inf                             Wald chi2(1)  =
0.62
Log likelihood = -150.79259                             Prob > chi2   =
0.4312

-------------------------------------------------------------------------
--- --
         mpg |      Coef.   Std. Err.      z    P>|z|     [95% Conf.
Interval]
-------------+-----------------------------------------------------------
--- --
eq1          |
       price |  -.0015613   .0019834    -0.79   0.431    -.0054486
.0023261
       _cons |    19.6171   10.84309     1.81   0.070    -1.634962
40.86917
-------------+-----------------------------------------------------------
--- --
sigma        |
       _cons |   9.881807   3.537671     2.79   0.005       2.9481
16.81551
-------------------------------------------------------------------------
--- --

Hope this helps,
Scott

-----Original Message-----
From: [email protected] [mailto:owner-
[email protected]] On Behalf Of Eric Sevigny
Sent: Thursday, September 30, 2004 5:07 PM
To: [email protected]
Subject: Re: st: Defining observation specific truncation points with
truncreg

Right, but what if I have ll(10) for 1997 and ll(20) for 1996 and want to
model these different truncation points? Can I do that with truncreg?

*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



*
*   For searches and help try:
*   http://www.stata.com/support/faqs/res/findit.html
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/



© Copyright 1996–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index