|
[Date Prev][Date Next][Thread Prev][Thread Next][Date index][Thread index]
[no subject]
Hi I am trying to do Terza's 2-step method of moments estimation in Stata, however I
am getting a strange error message. When I run it as it is below, with "1-normal(t)"
in the denominator of the second term in the correction equation, I get the following
error: "starting values invalid or some RHS variables have missing values."
If however, I simlply change "1-normal(t)" to ".99999-normal(t)" the estimation runs
as expected. If anyone can explain the cause of this error, I would be very greatful.
Below are the two versions of the estimation as well as links to the relevant files.
Thank you for your help.
- Ehsan Rahman
//This works properly
capture drop t
probit PRIVINS RGN2 RGN3 RGN4 MSA AGE AGE2 SEX WHITE MAR UNIV INC EMP SICKPAY ILLNESS
DISABILITY DISEASE
gen t = _b[_cons] + _b[RGN2]*RGN2 +_b[RGN3]*RGN3 +_b[RGN4]*RGN4 +_b[MSA]*MSA
+_b[AGE]*AGE +_b[AGE2]*AGE2 +_b[SEX]*SEX +_b[WHITE]*WHITE +_b[MAR]*MAR +_b[UNIV]*UNIV
+_b[INC]*INC +_b[EMP]*EMP +_b[SICKPAY]*SICKPAY +_b[ILLNESS]*ILLNESS
+_b[DISABILITY]*DISABILITY +_b[DISEASE]*DISEASE
nl
(PHY=exp({B0}+{B1}*RGN2+{B2}*RGN3+{B3}*RGN4+{B4}*MSA+{B5}*AGE+{B6}*AGE2+{B7}*SEX+{B8}*WHITE+{B9}*MAR+{B10}*UNIV+{B11}*INC+{B12}*EMP+{B13}*SICKPAY+{B14}*ILLNESS+{B15}*DISABILITY+{B16}*DISEASE+{B17}*PUBINS+{B18}*PRIVINS)*(
(PRIVINS*normal({B19} + t)/normal(t) ) +
((1-PRIVINS)*(1-normal({B19}+t))/(.99999-normal(t)) ) ) )
//This version produces the error message
capture drop t
probit PRIVINS RGN2 RGN3 RGN4 MSA AGE AGE2 SEX WHITE MAR UNIV INC EMP SICKPAY ILLNESS
DISABILITY DISEASE
gen t = _b[_cons] + _b[RGN2]*RGN2 +_b[RGN3]*RGN3 +_b[RGN4]*RGN4 +_b[MSA]*MSA
+_b[AGE]*AGE +_b[AGE2]*AGE2 +_b[SEX]*SEX +_b[WHITE]*WHITE +_b[MAR]*MAR +_b[UNIV]*UNIV
+_b[INC]*INC +_b[EMP]*EMP +_b[SICKPAY]*SICKPAY +_b[ILLNESS]*ILLNESS
+_b[DISABILITY]*DISABILITY +_b[DISEASE]*DISEASE
nl
(PHY=exp({B0}+{B1}*RGN2+{B2}*RGN3+{B3}*RGN4+{B4}*MSA+{B5}*AGE+{B6}*AGE2+{B7}*SEX+{B8}*WHITE+{B9}*MAR+{B10}*UNIV+{B11}*INC+{B12}*EMP+{B13}*SICKPAY+{B14}*ILLNESS+{B15}*DISABILITY+{B16}*DISEASE+{B17}*PUBINS+{B18}*PRIVINS)*(
(PRIVINS*normal({B19} + t)/normal(t) ) +
((1-PRIVINS)*(1-normal({B19}+t))/(1-normal(t)) ) ) )
//relevant files
https://mavspace.uta.edu:443/exr5618/ins2.dta
https://mavspace.uta.edu:443/exr5618/terza5.do
https://mavspace.uta.edu:443/exr5618/log2.txt
____________________________________________________________________________________
Be a better pen pal.
Text or chat with friends inside Yahoo! Mail. See how. http://overview.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/