chi2.test: Chi^2-berekening van matrix

Description Usage Arguments Value See Also

View source: R/statistics.R

Description

Hiermee wordt een uitgebreide Chi^2-berekening uitgevoerd op een matrix en een eventueel advies gegeven voor een G-test (g.test).

Usage

1
2
3
chi2.test(x, y = NULL, correct = TRUE, p = rep(1/length(x),
  length(x)), rescale.p = FALSE, simulate.p.value = FALSE, B = 2000,
  alpha = 0.05, info = TRUE)

Arguments

x

a numeric vector or matrix. x and y can also both be factors.

y

a numeric vector; ignored if x is a matrix. If x is a factor, y should be a factor of the same length.

correct

a logical indicating whether to apply continuity correction when computing the test statistic for 2 by 2 tables: one half is subtracted from all |O - E| differences; however, the correction will not be bigger than the differences themselves. No correction is done if simulate.p.value = TRUE.

p

a vector of probabilities of the same length of x. An error is given if any entry of p is negative.

rescale.p

a logical scalar; if TRUE then p is rescaled (if necessary) to sum to 1. If rescale.p is FALSE, and p does not sum to 1, an error is given.

simulate.p.value

a logical indicating whether to compute p-values by Monte Carlo simulation.

B

an integer specifying the number of replicates used in the Monte Carlo test.

alpha

Standaard is 0.05. Waarde waartegen p-waarde getoetst moet worden.

info

Standaard is TRUE. Geeft een tekstoverzicht van de analyse. Met FALSE wordt alleen de p-waarde geretourneerd.

Value

Tekst

See Also

g.test exact.test


msberends/certedata documentation built on Nov. 26, 2019, 5:19 a.m.