X hits on this document

Word document

click on “Load Preferences”; (4) click on “Factory Settings.” If the ... - page 17 / 44

411 views

0 shares

0 downloads

0 comments

17 / 44

stcox (Cox Proportional Hazard Model), and exponential and weibull regressions estimate a hazard rate.  The models do not contain the dependent variable in the command line (i.e., only the independent variables are listed for estimation procedure).  The dependent variable is listed after the time ordering term in the “stset” (survival set) command.  Thus, in the commands that follow the data were stacked by state per year (i.e., a series of consecutive years on one state and then a series of consecutive years on the next state, etc.) and dependent variable in all the analyses was “eitc” (whether the state had an eitc program in that year.  The time line for a state ended the first year they adopted the program (i.e., no scores on the dependent variable after that year).  A “failure” was coded “1” (i.e., the state adopted an eitc in that year) or “0” (the state did not adopt an eitc in that year).  

The “cluster” option is used on the end of one of the Cox Proportional Hazard models because it was suggested that the accuracy of the error could be improved by clustering by state.  The cluster command produces robust standard errors.  The “do” file for these commands appears below.

version 9

use c:/statepoliticaldata1880to2008, clear

stset year, failure(eitc)

stcox lhdem uhdem demgov top1

stcox lhdem uhdem demgov top1, cluster(state)

streg lhdem uhdem demgov top1, dist(exponential)

streg lhdem uhdem demgov top1, dist(weibull)

Note: in the exponential and weibull regressions the “dist” stands for “distribution.”  Also, you can use the cluster command with either the exponential or weibull regressions.  Thus, the following would be “okay”:

streg lhdem uhdem demgov top1, dist(exponential) cluster(state)

You can avoid much unnecessary convergence output by putting “nolog” and “no show” after the commands.  Thus,

stcox lhdem uhdem demgov top1, nolog noshow

or: stcox lhdem uhdem demgov top1, cluster(state) nolog noshow

From Tom Hayes on Cox Model and testing to see if it’s appropriate

****sets the data for duration

stset durat, failure(adoptinc)

***runs the stcox model, do not include DV, just do stcox and then IVs

stcox incomerel urban fiscal elect1 elect2 previousa ideology demcont repcont top1 south

*****this test let's us konw if appropriate model is cox regression.  If any variables come out signficant, it may not be best model*****

stphtest, detail

****test equality of survivor functions

Document info
Document views411
Page views474
Page last viewedTue Dec 06 13:05:56 UTC 2016
Pages44
Paragraphs843
Words17107

Comments