Multitype creates a multitype outcome object, usually used as a response variable in a hierarchical Cyclops model fit.

Multitype(y, type)

Arguments

y

Numeric: Response count(s)

type

Numeric or factor: Response type

Value

An object of class Multitype with length equal to the length of y and type.

Examples

Multitype(c(0,1,0), as.factor(c("A","A","B")))
#>      y type
#> [1,] 0    1
#> [2,] 1    1
#> [3,] 0    2
#> attr(,"contrasts")
#>   B
#> A 0
#> B 1
#> attr(,"class")
#> [1] "Multitype"