distance_bound: Upper bound for distance between clusters

Description Usage Arguments Value Examples

View source: R/wishart.R

Description

Under the null hypothesis of independence or homogeneity, the maximal squared contrast in rows or columns of contingency table, which can be interpreted as distance between rows is asympotically distributed as the largest eigenvalue of the Wishart matrix W(I_min(I,J), max(I,J)), where I and J are dimensions of the table.

Usage

1
2
distance_bound(table, alpha = 0.05, options = list(samples = 1000, seed
  = 42))

Arguments

table

object of class table. The contingency table to calculate the upper bound for.

alpha

double. The returned value is 1-alpha quantile of the underlying distribution. Default is 0.05.

options

list. Two elements taken into accout is "samples", which says how many repetitions to use in simulating distribution (default: 1000) and "seed" used in sampling if not null (default: NULL).

Value

The 1-alpha quantile of the distribution of maximal estimated squared contrast in tables of the size like the given table under the null hypothesis of independence or homogeneity.

Examples

1
distance_bound(israeli_survey, options = list(samples = 1000, seed = 42))

aczepielik/CrossTabCluster documentation built on June 19, 2020, 7:53 p.m.