Statalist The Stata Listserver


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

Re: st: Equivalence of Heckprob and ml model commands--initial values of rho


From   Maarten buis <maartenbuis@yahoo.co.uk>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Equivalence of Heckprob and ml model commands--initial values of rho
Date   Thu, 7 Dec 2006 20:22:51 +0000 (GMT)

--- Rachel <academicgirl@gmail.com> wrote:
> I looked at the initial values for Heckprob, which include
> athrho=atanh(rho).  I fed all these initial values into ml model
> (eqn1) (eqn2) /athrho, max trace gradient as shown below.
> But when I look at the results of the 0th iteration for both, the
> parameter values match for all parameters *except* athrho. I don't
> understand why this is, since both should be equivalent.  In the
> heckprob case, the initial value results from a calculation within
> the program.  In the case of simply calling ml model heckp_lf ...  ,
> the calculation doesn't take place, so the initial value should
remain
> as it was specified.

If you use the from option you override those internal computations. So
in the example below you should see the same problem. However, the
initial value is atanh(.50)=.5493061 and in the first itteration it
uses that same number. So I cannot reproduce your problem.

Hope this helps,
Maarten

*-------------- begin example --------------------------
use http://www.stata-press.com/data/r9/gss1991.dta, clear
sum prestg80 
gen high = prestg80 > r(mean) if unemploy == 0
gen employ =! unemploy
gen higheduc = max(maeduc, paeduc)

probit high educ higheduc sex black
matrix b0 = e(b)
local coln : colnames b0
foreach name of local coln {
	local colname "`colname' high:`name'"
}

probit employ RegionNE RegionSE educ sex black hlth4 hlth5
matrix temp = e(b)
local coln : colnames temp
foreach name of local coln {
	local colname "`colname' employ:`name'"
}
local colname "`colname' athrho:_cons"
matrix b0 = b0, temp, atanh(.5)
matrix colname b0 = `colname'
matrix list b0

di atanh(.50)
heckprob high educ higheduc sex black, /*
  */ select(employ = RegionNE RegionSE educ sex black hlth4 hlth5) /*
  */ from(b0) trace
*----------- end example -----------------------

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


		
___________________________________________________________ 
All New Yahoo! Mail  Tired of Vi@gr@! come-ons? Let our SpamGuard protect you. http://uk.docs.yahoo.com/nowyoucan.html
*
*   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–2020 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index