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, statalist.org is already up and running.

# Re: st: truncreg with linear restriction

 From Austin Nichols To statalist@hsphsun2.harvard.edu Subject Re: st: truncreg with linear restriction Date Thu, 23 Feb 2012 13:21:17 -0500

```Stefan Öberg <Stefan.Oberg@econhist.gu.se>:
I suspect you would be better off not constraining the variance; see also
but here are various options:

webuse nhanes2, clear
reg height age i.sex i.race if age>30
reg height age i.sex i.race if age>30 & height>160
truncreg height age i.sex i.race if age>30 , ll(160)
constraint 1 [sigma]_cons = 9.656
truncreg height age i.sex i.race if age>30 , ll(160) constraint(1)
qui truncreg height age i.sex i.race if age>30 , ll(1)
constraint 1 [sigma]_cons = `=e(sigma)'
truncreg height age i.sex i.race if age>30 , ll(160) constraint(1)

Note you really want to constrain to the residual variance, not the
population marginal variance; do you know what the constraint should
be?

On Thu, Feb 23, 2012 at 10:58 AM, Stefan Öberg
<Stefan.Oberg@econhist.gu.se> wrote:
> Hi!
>
> I am using truncreg to estimate the effects from a set of variables on heights that are subject to some truncation below a minimum height requirement. I would like to use the restricted estimator as proposed by Brian A’Hearn (2004), A restricted maximum likelihood estimator for truncated height samples, Economics & Human Biology, Volume 2(1), Pages 5–19.
>
> How do I write the linear restriction to do this?
>
> I am using Stata 11.2.
>
> Yours sincerely
> Stefan Öberg

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