Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down at the end of May, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

st: stcox with dummies (fixed effects)


From   Ivan Png <iplpng@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   st: stcox with dummies (fixed effects)
Date   Sun, 25 Mar 2012 23:20:19 -0400

Dear Statalist

I am analyzing the factors that affect U.S. states' enactment of a
particular law, the Uniform Trade Secrets Act.  The sample runs from
1979-2005.  By 2005, 45 of the states had enacted the law. I used
stcox with state GDP and population  as explanatory variables. I
wanted to control for non-time varying heterogeneity among the states,
so tried including "i.state".  However, the system returned
"flat region resulting in a missing likelihood".

I tried constructing dummy variables for each state, and including
only dummies for states that enacted the law (instances of failure).
I still encountered the problem of "flat region resulting in a missing
likelihood".


I then tried the benchmark "uis" dataset introduced in
http://www.ats.ucla.edu/stat/stata/seminars/stata_survival/default.htm


. set matsize 1000

. stset time, failure(censor)

.  stcox age beck i.id

The system dropped two of the state dummies, and then, after 5
iterations, the estimation stopped with "flat region resulting in a
missing likelihood".

I then tried

. stcox i.id

After 25 iterations, the estimation stopped with "flat region
resulting in a missing likelihood".

Is the problem that stcox doesn't work with a dummy variable for every
entity that experiences a failure (where each entity experiences at
most one failure)?  Like insufficient degrees of freedom in OLS?
But in OLS, with more explanatory variables to be estimated than
observiations, the estimation simply doesn't start.  Why does the
stcox run for a few iterations and then fail?

Would it help to set starting values to avoid the "flat region"?  But
stcox does not seem to accept a "from( ..)" option.

(I'm using STATA-11.)

Many thanks
Ivan Png
National Univ of Singapore
*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index