suffstats | R Documentation |
Calculate, manipulate, and display sufficient statistics of the multiplicative multinomial. Functionality for analysing datasets, and distributions specified by their parameters is given; summary and print methods are also documented here.
suffstats(y, n = NULL)
expected_suffstats(L,Y)
## S3 method for class 'suffstats'
print(x, ...)
## S3 method for class 'suffstats'
summary(object, ...)
## S3 method for class 'summary.suffstats'
print(x, ...)
y , n |
In function |
L , Y |
In function |
x , object |
An object of class |
... |
Further arguments to the print or summary methods. Currently ignored |
Function suffstats()
returns a list comprising a set of
sufficient statistics for the observations y,[n]
.
This function requires that the rowsums of y
are all
identical.
Function suffstats()
returns a list of four components:
Rowsums of y
Number of observations
Column sums of y
, counted with multiplicity
Matrix of summed squares
Function summary.suffstats()
provides a summary of a
suffstats
object that is a list with two elements:
row_sums
and cross_prods
, normalized with nobs
and
Y
so that the values are comparable with that returned by
expected_suffstats()
. In particular, the sum of row_sums
is the known sum \mjseqny.
Robin Hankin and P. M. E. Altham
data(voting)
suffstats(voting, voting_tally)
data(wilson)
wilson <- gunter(non_met)
suffstats(wilson)
L <- Lindsey(wilson)
expected_suffstats(L,5)
summary(suffstats(wilson)) ## matches.
summary(suffstats(rMM(10,5,L))) # should be close.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.