This is a test version of Biostars. For the public version, visit https://www.biostars.org.
Error message (arguments imply differing number of rows: 0, 1 ) when running epi.2by2

Dear all, I am trying to obtain odds ratio for a pairs of variables listed as columns here in this data set This is my data set for 8 variable These variables are factor levels with the variable Sex (2-levels) and other variable is from > 2 levels I run the follwoing code

Breed <-table(Data$Status, Data$Breed)
Sex <-table(Data$Status, Data$Sex)
living <-table(Data$Status, Data$Living)
Anxiety <-table(Data$Status, Data$`Anxiety/stress`)
Excersise<- table(Data$Status, Data$`Frequency excersise (per week)`)
Kind <- table(Data$Status, Data$`Kind of food`)
Feline<- table(Data$Status, Data$`Household feline number`)

epi.2by2(Sex, method = "cohort.count", conf.level = 0.95)
epi.2by2(Feline, method = "cohort.count", conf.level = 0.95)
epi.2by2(Kind, method = "cohort.count", conf.level = 0.95)

The epi.2by2 code for the Sex variable worked nice, but the other variable did not and gave the error ( Error in data.frame(est = cmOR.p, lower = cmOR.l, upper = cmOR.u) : arguments imply differing number of rows: 0, 1). Actually my subject is not even a data.frame ? I think it has something to do with n of rows ? Any comment ?

Thanks

program r

0 answers

No answers yet.

Log in to answer this question.