achisq.stat {DCluster} | R Documentation |
Compute Pearson's Chi-square statistic. See achisq manual page for more details.
achisq.stat(data, lambda=NULL)
data |
A dataframe containing the data, as specified in the DClustermanpage. |
lambda |
The value of the relative risks under the null hypotheses. If its NULL, the second hypotheses commented above is considered and the expected number of cases will automatically be corrected. |
A list with three components
T |
The value of the statistic. |
df |
Degrees of freedom of the asinthotic Chi-square distribution. |
pvalue |
Related pvalue. |
Potthoff, R. F. and Whittinghill, M.(1966). Testing for Homogeneity: I. The Binomial and Multinomial Distributions. Biometrika 53, 167-182.
Potthoff, R. F. and Whittinghill, M.(1966). Testing for Homogeneity: The Poisson Distribution. Biometrika 53, 183-190.
DCluster, achisq, achisq.boot, achisq.pboot
library(spdep) data(nc.sids) sids<-data.frame(Observed=nc.sids$SID74) sids<-cbind(sids, Expected=nc.sids$BIR74*sum(nc.sids$SID74)/sum(nc.sids$BIR74)) #Compute the statistic under the assumption that lambda = 1. achisq.stat(sids, lambda=1)