Though an official enhancement to -treatreg- would be best, I believe the
following changes to will allow the -from()- option.
1. Save -treatreg- as -treatreg2- in your personal ado file
2. Add -From(string)- to line 43:
*/ , TReat(string) HAzard(string) /*
to
*/ , TReat(string) From(string) [ HAzard(string) /*
3. Add after line 174
if "`from'" != "" {
local b1 "`from' "
}
Line 174: mat `b1' = `b1', `athrho', `lnsigma'
4. Change init(`b0',copy) to init(`b0') in line 437
For example:
. use http://www.stata-press.com/data/r9/labor,clear
. gen wc=0
. replace wc=1 if we>12
(69 real changes made)
. treatreg ww wa cit faminc, treat(wc=wmed wfed hhrs ha he hw lfp)
Iteration 0: log likelihood = -664.57403 (not concave)
Iteration 1: log likelihood = -664.51615 (not concave)
Iteration 2: log likelihood = -664.4659 (not concave)
Iteration 3: log likelihood = -664.41291 (not concave)
Iteration 4: log likelihood = -664.31122 (not concave)
Iteration 5: log likelihood = -664.23201 (not concave)
Iteration 6: log likelihood = -664.18572 (not concave)
Iteration 7: log likelihood = -664.11402 (not concave)
Iteration 8: log likelihood = -664.05074 (not concave)
Iteration 9: log likelihood = -663.99272 (not concave)
Iteration 10: log likelihood = -663.88285 (not concave)
Iteration 11: log likelihood = -663.79689 (not concave)
Iteration 12: log likelihood = -663.72438 (not concave)
Iteration 13: log likelihood = -663.65898 (not concave)
Iteration 14: log likelihood = -663.53511 (not concave)
Iteration 15: log likelihood = -663.45993 (not concave)
Iteration 16: log likelihood = -663.42369 (not concave)
Iteration 17: log likelihood = -663.36992
Iteration 18: log likelihood = -662.20396
Iteration 19: log likelihood = -661.56336
Iteration 20: log likelihood = -661.53448
Iteration 21: log likelihood = -661.53441
Iteration 22: log likelihood = -661.53441
Treatment-effects model -- MLE Number of obs = 250
<snip>
. matrix b = e(b)
. treatreg2 ww wa cit faminc, treat(wc=wmed wfed hhrs ha he hw lfp)
from(b)
Iteration 0: log likelihood = -661.53441
Iteration 1: log likelihood = -661.53441
Treatment-effects model -- MLE Number of obs = 250
<snip>
. treatreg2 ww wa cit faminc, treat(wc=wmed wfed hhrs ha he hw lfp) from(
wa = -.1 cit = 1 he = 1, skip)
Iteration 0: log likelihood = -5732.9635 (not concave)
Iteration 1: log likelihood = -1518.4537
Iteration 2: log likelihood = -700.08461
Iteration 3: log likelihood = -665.12698
Iteration 4: log likelihood = -661.69544
Iteration 5: log likelihood = -661.53498
Iteration 6: log likelihood = -661.53441
Iteration 7: log likelihood = -661.53441
Treatment-effects model -- MLE Number of obs = 250
<snip>
. treatreg2 ww , treat(wc=wmed ) from( -.1 1 0 0 0 0,copy)
Iteration 0: log likelihood = -1462.3369
Iteration 1: log likelihood = -858.46772
Iteration 2: log likelihood = -728.06455
Iteration 3: log likelihood = -713.06995
Iteration 4: log likelihood = -712.84529
Iteration 5: log likelihood = -712.84437
Iteration 6: log likelihood = -712.84437
Treatment-effects model -- MLE Number of obs = 250
<snip>
Scott
-----Original Message-----
From: [email protected] [mailto:owner-
[email protected]] On Behalf Of Partha Deb
Sent: Thursday, May 25, 2006 9:50 AM
To: [email protected]
Subject: Re: st: maximize_option -from- in treatreg
Thanks Jeff.
--On Wednesday, May 24, 2006 11:46 PM -0500 "Jeff Pitblado, StataCorp LP"
<[email protected]> wrote:
> Partha Deb <[email protected]> seems to really need to supply
> starting values to -treatreg-:
>
>> Why not "fix" the ado file? I'm doing a large number of simulations
>> with -treatreg- and for such applications it's helpful to be able to
>> specify starting values.
>
> Although -treatreg- is not exactly "broken", we can sympathize with
> Partha. Without making any promises, we'll look into adding a -from()-
> option to -treatreg-.
>
> --Jeff
> [email protected]
*
* 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/