Hi, I want to set a make a contingency table which will look like this.. The problem is that I can't set the table like the following.
col1 col2 Total row1 a b n10 rp1 rp2 100 cp1 cp2 rtp1 --------------------------------------------- row2 c d n20 rp3 rp4 100 cp3 cp4 rtp2 --------------------------------------------- Total n01 n02 n ctp1 ctp2 100 100 100 100 Suppose a<-67; b<-10; c<-79; d<-67; n<-a+b+c+d; n10<-a+b; n01<-a+c; n20<-n-n10; n02<-n-n01; rp1<-(a/n10)*100; rp2<-100-rp1; rp3<-(c/n20)*100; rp4<-100-rp3; cp1<-(a/n01)*100; cp2<-100-cp1; cp3<-(c/n02)*100; cp4<-100-cp3; rtp1<-(n10/n)*100; rtp2<-100-rtp1; ctp1<-(n01/n)*100; ctp2<-100-ctp1; After this I can't procced in a meaningful way. Can anyone help me out? Thanks in advance. Bhargab [[alternative HTML version deleted]]
______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.