Skip to content

Compare the risk

5 messages · kiotoqq, David Winsemius

#
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?
#
On Jan 7, 2011, at 1:58 PM, kiotoqq wrote:

            
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.)
#
On Jan 7, 2011, at 5:28 PM, kiotoqq wrote:

            
Of course it says, "dfrm not found". That's because it's on _my_  
workspace. You did not say what you were calling your dataframe and I  
cannot read your mind. I had to make up some name, and the chances  
that I would call it the same name as you did are pretty small.

--

David Winsemius, MD
West Hartford, CT