Statalist


[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]

Re: st: Censored ... Heteroskedastic regression


From   Maarten buis <[email protected]>
To   [email protected]
Subject   Re: st: Censored ... Heteroskedastic regression
Date   Fri, 21 Dec 2007 11:30:49 +0000 (GMT)

--- Fabrice <[email protected]> wrote:
> I am trying to estimate an effect on variability of a dependent
> variable that happens to be censored.
> 
> Normally, without censoring, I use a simple Maximum Likelihood
> Estimation, modeling in Stata the residual as I see fit. For
> instance, I can parameterize a simple linear effect both on mean and
> variance by:
> ml model lf mynormal1_lf (mu: Y=X) (sigma: X)
> 
> For censoring, if I were to just seek the main effect, I would use a
> normal tobit.
> 
> QUESTION: would anyone have a suggestion how to estimate (in Stata!)
> effect on dependent variable variance in the case of censored DV?
> 
> Obviously, I could write my own likelihood function, but do not feel
> confident enough to do so yet (and maybe that is already done
> somewhere).

Below is a quick stab at a heteroskedastic tobit: the global tau is the
value at which the dependent variable is censored.

*-------------- begin example -------------------
set more off
sysuse nlsw88, clear
gen lnw = ln(wage)

capture program drop hettobit_lf
program define hettobit_lf
	version 9.2
	args lnf mu lnsigma
	quietly {
		replace `lnf' =                         ///
                lnnormalden($ML_y1,`mu',exp(`lnsigma')) ///
                if $ML_y1 > $tau

		replace `lnf' =                         /// 
                lnnormal(($tau -`mu')/exp(`lnsigma'))   ///
		if $ML_y <= $tau
	}
end

global tau = 1.4

ml model lf hettobit_lf                                 ///
         (mu: lnw=grade ttl_exp union)                  ///
         (lnsigma: union)
ml check
ml search
ml maximize
*--------------- end example -------------------------
(For more on how to use examples I sent to the Statalist, see
http://home.fsw.vu.nl/m.buis/stata/exampleFAQ.html )

Hope this helps,
Maarten

-----------------------------------------
Maarten L. Buis
Department of Social Research Methodology
Vrije Universiteit Amsterdam
Boelelaan 1081
1081 HV Amsterdam
The Netherlands

visiting address:
Buitenveldertselaan 3 (Metropolitan), room Z434

+31 20 5986715

http://home.fsw.vu.nl/m.buis/
-----------------------------------------


      __________________________________________________________
Sent from Yahoo! Mail - a smarter inbox http://uk.mail.yahoo.com

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