powered by
Create a filter matrix that multiplying the vector of counts from a complete contingency table, gives a collapsed contingency table.
scatter(y,s)
A matrix of orthogonal columns of 1s and 0s
is the observed contingency table. Provides a target length only.
is a vector of indices, one for each cell of the full (unobserved) contingency table, representing the appropriate cell of y
y
David L Duffy
y<-double(3) z<-1:5 z %*% scatter(y,c(1,1,2,3,3)) ## 1+2, 3, 4+5
Run the code above in your browser using DataLab