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

# st: endogenous switching model

 From "Ayla Kayhan" To Subject st: endogenous switching model Date Tue, 24 Jun 2003 17:49:10 -0500

```Hi,

I would to estimate an endogenous switching model where the sample
separation is not known (Maddala 1983, 1986). Specifically, I would like
to estimate two sets of parameters for the two regimes where the
observations are endogeneously assigned to one of the two groups (I do
not observe the sample separation). I have specified the maximum
likelihood function but the code I have written is not converging.  I
have tried various starting values including the OLS parameter estimates
that I have obtained from the entire sample, but the ml procedure failed
to converge.

Any ideas as to how I can get this procedure to converge is greatly
appreciated.

Thank you very much,

Ayla

Note:  The following is the program I defined for ml

program define maxim;
version 7.0;

args lnf theta1 theta2 theta3 theta4 theta5 theta6 theta7;

quietly replace
`lnf' = ln(
norm(
(-`theta1'-(`theta3'*(\$ML_y1-`theta6')/`theta2'^2))
/sqrt(1-(`theta3'^2/`theta2'^2))
)
*normd(\$ML_y1-`theta4')/`theta2'
+ (1-norm(
(-`theta1'-(`theta5'*(\$ML_y1-`theta7')/`theta6'^2))
/sqrt(1-(`theta5'^2/`theta6'^2))
))
*normd(\$ML_y1-`theta7')/`theta6'
);
end;

ml model lf ayla (d5bl = lceoownp lmeddpay loffcc)
()
()
(led5 lcov5 lmbbfd5 lmtob lebitda lppe lsize)
()
()
(led5 lcov5 lmbbfd5 lmtob lebitda lppe lsize pl5bl), robust
cluster(gvkey);

*
*   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–2017 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index