Here is how I did this problem.
predict e_inj, mu
predict dev, standardized deviance
generate e_rate = e_inj/ childyrs
lowess dev e_inj, bwidth(0.2) msymbol(Oh)
count if dev>2 dev < -2
list dev e_inj inj_dth if dev>2 & inj_dth >= 2
MIKE
Thursday, April 10, 2008
Tuesday, April 8, 2008
Chater 9
Julie and I got through the last question, although we abbreviated filling in the rest of the table using lincom, we just did a couple of examples. Here is our code:
set memory 11000
use C:\WDDtext\8.ex.InjuryDeath.dta
xi: glm inj_dth i.age_mom i.lbw i.educ_mom i.income i.illegit i.oth_chld i.race_mom i.pnclate i.age, family(poisson) link(log) lnoffset(childyrs) eform
* A couple examples of using lincom, completing the rest of the table
lincom pnclate _Iage_mom_29- _Iage_mom_30, irr
lincom _Iage_mom_29- _Iage_mom_30, irr
sort age age_mom lbw educ_mom income illegit oth_chld race_mom pnclate
collapse (sum) childyrs= childyrs inj_dth = inj_dth, by(age age_mom lbw educ_mom illegit income oth_chld race_mom pnclate)
xi: glm inj_dth i.age_mom i.lbw i.educ_mom i.income i.illegit i.oth_chld i.race_mom i.pnclate i.age, family(poisson) link(log) lnoffset(childyrs)
predict e_inj_dth, mu
predict dev, standardized deviance
generate e_rate = 1000* e_inj_dth/ childyrs
label variable e_rate "Incidence of Injury Death per Thousand"
lowess dev e_rate, bwidth(0.2) msymbol(Oh)
set memory 11000
use C:\WDDtext\8.ex.InjuryDeath.dta
xi: glm inj_dth i.age_mom i.lbw i.educ_mom i.income i.illegit i.oth_chld i.race_mom i.pnclate i.age, family(poisson) link(log) lnoffset(childyrs) eform
* A couple examples of using lincom, completing the rest of the table
lincom pnclate _Iage_mom_29- _Iage_mom_30, irr
lincom _Iage_mom_29- _Iage_mom_30, irr
sort age age_mom lbw educ_mom income illegit oth_chld race_mom pnclate
collapse (sum) childyrs= childyrs inj_dth = inj_dth, by(age age_mom lbw educ_mom illegit income oth_chld race_mom pnclate)
xi: glm inj_dth i.age_mom i.lbw i.educ_mom i.income i.illegit i.oth_chld i.race_mom i.pnclate i.age, family(poisson) link(log) lnoffset(childyrs)
predict e_inj_dth, mu
predict dev, standardized deviance
generate e_rate = 1000* e_inj_dth/ childyrs
label variable e_rate "Incidence of Injury Death per Thousand"
lowess dev e_rate, bwidth(0.2) msymbol(Oh)
Monday, April 7, 2008
Devoted class goers
I looked over the homework and the first two questions are really easy. I just changed one line of code (given below) and then ran the exact same program as we did for the the last chapter, question 3. I will start to work on #3 and if anyone has any specific questions on it, feel free to ask.
xi: glm inj_dth i.age_mom i.lbw i.educ_mom i.income i.illegit i.oth_chld i.race_mom i.pnclate i.age, family(poisson) link(log) lnoffset(childyrs) eform
MIKE
xi: glm inj_dth i.age_mom i.lbw i.educ_mom i.income i.illegit i.oth_chld i.race_mom i.pnclate i.age, family(poisson) link(log) lnoffset(childyrs) eform
MIKE
Saturday, March 15, 2008
Thanks for your insight Mike
Thanks for taking the time to publish this comment about your and Xiaoming's conversation. I wish I had read this before the midterm (both in class and take home). Now that we have handed in the midterm, I was wondering what you all did to figure out the OR and 95%CI for Question #3, relating to the OR for a 53 year old with 155 mmHG compared to a 47 year old with SBP 113. I racked my brain trying to figure this out...sticking with the model (not using an interaction term) but bringing in all these variables. Anyone care to share?
Monday, March 10, 2008
Good things to know for the test ... perhaps?
I was talking with Xiaoming after class and he helped me out with a few concepts. These might be useful to know for the test.
1) (Looking at Table 7.2 on pg 235) If you want to compare the RR of CHD for a women with 71-80 mm Hg compared to a man with 101-110 mm Hg, then you divide the two numbers. 10.9 / 2.43 = 4.49 . This method also works when adding interaction terms (Table 7.3). You can not just divide the numbers to get the 95% C.I. for the RR because you have to take into account the covariance. Xiaoming said to use the “lincom” command in STATA to figure this out.
2) (Looking at the STATA output on top of pg 249) If you want to compare the relative risk for CHD of a 75 year old compared to a 45 year old (30 year difference) then you take the coefficient of age (1.04863) and raise it to the 30th power.
Mike
1) (Looking at Table 7.2 on pg 235) If you want to compare the RR of CHD for a women with 71-80 mm Hg compared to a man with 101-110 mm Hg, then you divide the two numbers. 10.9 / 2.43 = 4.49 . This method also works when adding interaction terms (Table 7.3). You can not just divide the numbers to get the 95% C.I. for the RR because you have to take into account the covariance. Xiaoming said to use the “lincom” command in STATA to figure this out.
2) (Looking at the STATA output on top of pg 249) If you want to compare the relative risk for CHD of a 75 year old compared to a 45 year old (30 year difference) then you take the coefficient of age (1.04863) and raise it to the 30th power.
Mike
Wednesday, March 5, 2008
Aaron, HW6 #4
xi: stcox i.pd if pd~=1
*Risk = 6.045 95% CI = 3.658 – 9.989
xi: stcox i.pd if pd~=2
*Risk=2.018 95% CI = 1.327 – 3.069
*Risk = 6.045 95% CI = 3.658 – 9.989
xi: stcox i.pd if pd~=2
*Risk=2.018 95% CI = 1.327 – 3.069
Mike: Chapter 6, #5
There were only a few lines of codes for this problem.
summarize entage if pd==0
summarize entage if pd==1
summarize entage if pd==2
oneway entage pd, bonferroni tabulate
summarize entage if pd==0
summarize entage if pd==1
summarize entage if pd==2
oneway entage pd, bonferroni tabulate
Subscribe to:
Comments (Atom)