I am trying to do the proportion test, but an error is appearing and I cannot solve it. My DF
refers to people who have been treated for stroke in two different hospitals. The first column is from the ICD. My DF:
ICD <- c ("I64", "I609", "I638", "I694", "I671", "I618", "I652", "I639", "I620", "I629")
HOSP1 <- c (1286,39,66,54,23,43,16,12,3,16)
HOSP2 <-c (818,28,7,27,5,19,11,20,27,4)
DF <- data.frame (ICD, HOSP1, HOSP2)
My testing:
prop.test(x=(DF$HOSP1,DF$HOSP2))
My mistake:
Error: unexpected ',' in "prop.test (x = (DF $ HOSP1,"
I would like to help to solve this test of proportion. What am I missing?