Compare the risk

5 messages
Open this post in threaded view
|

Compare the risk

 I have a dataset which looks like this:      cbr  dust smoking expo 1      0  0.20       1    5 2      0  0.25       1    4 3      0  0.25       1    8 4      0  0.25       1    4 5      0  0.25       1    4 6      0  0.25       1    8 7      0  0.25       1    8 8      0  0.25       1    4 9      1  0.25       1    8 10     0  0.29       1    7 11     0  0.29       0    7 12     0  0.29       1    7 13     0  0.30       0   10 14     0  0.30       1   10 15 16 . . . How can I compare the risk of getting bronchitis between smoker and no-smoker?
Open this post in threaded view
|

Re: Compare the risk

 On Jan 7, 2011, at 1:58 PM, kiotoqq wrote: > > I have a dataset which looks like this: > >     cbr  dust smoking expo > 1      0  0.20       1    5 > 2      0  0.25       1    4 > 3      0  0.25       1    8 > 4      0  0.25       1    4 > 5      0  0.25       1    4 > 6      0  0.25       1    8 > 7      0  0.25       1    8 > 8      0  0.25       1    4 > 9      1  0.25       1    8 > 10     0  0.29       1    7 > 11     0  0.29       0    7 > 12     0  0.29       1    7 > 13     0  0.30       0   10 > 14     0  0.30       1   10 > 15 > 16 > . > . > . > > > How can I compare the risk of getting bronchitis between smoker and > no-smoker? cbrsmk.tbl <- with(dfrm, table(cbr, smoking) ) cbrsmk.tbl cbrsmk.tbl[2, ]/(cbrsmk.tbl[1, ]+cbrsmk.tbl[2, ]) (That homework set must be going awfully slowly.) -- David Winsemius, MD West Hartford, CT ______________________________________________ [hidden email] mailing list https://stat.ethz.ch/mailman/listinfo/r-helpPLEASE do read the posting guide http://www.R-project.org/posting-guide.htmland provide commented, minimal, self-contained, reproducible code.
Open this post in threaded view
|

Re: Compare the risk

 thank you...... but it says "dfrm not found" (sorry, I'm just very new here....)