Performs a Pearson's Chi-squared test for comparing response probabilities (i.e. when the response variable is a binary variable) to given values. The function is in fact a wrapper to the chi-squared test for comparison of proportions to given values on a contingency table.
1 |
formula |
a formula of the form |
data |
an optional data frame containing the variables in the formula |
p |
theoretical probabilities. |
If the response is a 0/1 variable, the probability of the '1' group is tested. In any other cases, the response is transformed into a factor and the probability of the second level is tested.
method.test |
a character string giving the name of the test. |
data.name |
a character string giving the name(s) of the data. |
alternative |
a character string describing the alternative hypothesis, always two-sided. |
estimate |
the estimated probabilities. |
null.value |
the theoretical probabilities. |
statistic |
test statistics. |
parameter |
test degrees of freedom. |
p.value |
p-value of the test. |
Maxime Herv<e9> <mx.herve@gmail.com>
prop.test
, chisq.bin.exp
, prop.bin.multcomp
1 2 3 4 |
Questions? Problems? Suggestions? Tweet to @rdrrHQ or email at ian@mutexlabs.com.
All documentation is copyright its authors; we didn't write any of that.