Invisibly returns an object of classes th_test and htest containing the statistic, degrees of freedom, p-value, critical value, decision, observed frequencies, and expected frequencies. When plot = TRUE, an educational graph is produced as a side effect.
Arguments
dadosX
Vector for the first categorical variable. Use NULL when a frequency table is supplied.
dadosY
Vector for the second categorical variable. Use NULL when a frequency table is supplied.
FO
Matrix of observed frequencies.
alfa
Significance level.
Ha
Right-tailed alternative. Use 2 or "greater"; other values are rejected.
r
Retained for backward compatibility. It must be zero; Pearson degrees of freedom are used without adjustment.
plot
Logical. If TRUE (default), draw the educational graph; if FALSE, return the result without plotting.
Author
Willian Silva Barros
Details
The function accepts two categorical variables recorded at the observation level or an observed contingency table. The standard omnibus chi-square test of independence has an upper-tail rejection region.