Performs a bootstrap test of independance between two categorical variables
Performs a bootstrap test of independance between two categorical variables
bootstrap.contingency.test( rds.data, row.var, col.var, number.of.bootstrap.samples = 1000, weight.type = c("HCG", "RDS-II", "Arithmetic Mean"), table.only = FALSE, verbose = TRUE, ... )
rds.data |
an rds.data.frame |
row.var |
the name of the first categorical variable |
col.var |
the name of the second categorical variable |
number.of.bootstrap.samples |
The number of simulated boootstrap populations |
weight.type |
The type of weighting to use for the contningency table. Only large sample methods are allowed. |
table.only |
only returns the weighted table, without bootstrap. |
verbose |
level of output |
... |
Additional parameters for compute_weights |
This function first estimates a Homophily Configuration Graph model for the underlying network under the assumption that the two variables are independant and that the population size is large. It then draws bootstrap RDS samples from this population distribution and calculates the chi.squared statistic on the weighted contingency table. Weights are calculated using the HCG estimator assuming a large population size.
data(faux) bootstrap.contingency.test(rds.data=faux, row.var="X", col.var="Y", number.of.bootstrap.samples=50, verbose=FALSE)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.