scatter: Create a filter matrix from a summary array of indices

View source: R/gllm.R

scatterR Documentation

Create a filter matrix from a summary array of indices

Description

Create a filter matrix that multiplying the vector of counts from a complete contingency table, gives a collapsed contingency table.

Usage

scatter(y,s) 

Arguments

y

is the observed contingency table. Provides a target length only.

s

is a vector of indices, one for each cell of the full (unobserved) contingency table, representing the appropriate cell of y

Value

S

A matrix of orthogonal columns of 1s and 0s

Author(s)

David L Duffy

Examples

y<-double(3)
z<-1:5
z %*% scatter(y,c(1,1,2,3,3))
## 1+2, 3, 4+5

gllm documentation built on Oct. 18, 2022, 9:06 a.m.

Related to scatter in gllm...