Monday, February 4, 2008

Chapter 3: 7-9

Here is my code for 7-9:

Question 7:

predict z, rstandard

predict deltab1, dfbeta(logmort)

predict cook, cooksd


display invttail(22,.025)


sort t

list disease h z t deltab1 cook if abs(deltab1)>0.5

Question 8

label variable logdol "Log thousands of dollars of NIH research funds per year"

label variable logprev "Log disease prevalence rate per 1000"

label variable loghospdays "Log thousands of hospital-days"

label variable logmort "Log disease mortality rate per 1000"

label variable logyrslost "Log thousands of life-years lost"

label variable logdisbil "Log thousands of disability-adjusted life-years lost"

graph matrix logdol loghospdays logmort logyrslost logdisbil, msymbol(Oh) mcolor(gs10)

Question 9

regress logdol loghospdays logmort logyrslost logdisbil if abs(deltab1)<0.5


display (-.0028409 -.170048)/.1852302

No comments: