Good evening R-users!

I have the following problem: i want to get a weighted crosstable along with 
the adjusted standardized residuals test

Example:
 a<-c(1,1,1,1,1,2,2,2,3,3)
 b<-c(10,10,23,24,33,45,46,70,21,66)
 c<-c(3,3,2,3,4,1,1,1,3,3)
 d<-c("a", "b","b","c","a","a","a", "b", "c","c")
 z<-data.frame(a, b,c,d)
library(gmodels) 

Using the above example i want to get this :

xtabs(c ~ a+d, z) ,                 where i have 
sum(xtabs(c ~ a+d, z) )         as my total number of cases, but with the 
adjusted standardized residuals test. 

So i want something like the CrossTable function from gmodels package, but 
taking into account that i have weights  which sum to 24 and not 10, as the 
CrossTable prints from this: 

 CrossTable(z$a, z$d, format="SPSS", asresid=T)

Thank you and have a great day ahead!


       
---------------------------------

        [[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.

Reply via email to