Compute the chisquare goodness of fit statistic for specified ROC data fitting model
ChisqrGoodnessOfFit(fpCounts, tpCounts, parameters, model, lesDistr)
The FP counts table
The TP counts table
The parameters of the model including cutoffs, see details
The fitting model: "BINORMAL", "CBM" or "RSM
The lesion distribution matrix; not needed for "BINORMAL" or "CBM" models. Array [1:maxLL,1:2]. The probability mass function of the lesion distribution for diseased cases. The first column contains the actual numbers of lesions per case. The second column contains the fraction of diseased cases with the number of lesions specified in the first column. The second column must sum to unity.
The return value is a list with the following elements:
The chi-square statistic
The p-value of the fit
The degrees of freedom
For model = "BINORMAL" the parameters are c(a,b,zetas). For model = "CBM" the parameters are c(mu,alpha,zetas). For model = "RSM" the parameters are c(mu,lambdaP,nuP,zetas).