Test the goodness of fit and the primary study endpoint is non-binary categorical response. pk=nk/n, nk is the frequency count of the subjects with response value k. pk,0 is a reference value.
H0: pk=pk,0 for all k
Ha: not equal
gof.Pearson(alpha, beta, pk, pk0, r)
significance level
power = 1-beta
pk is the proportion of each subject in treatment group.
pk0 is a reference value.
degree of freedom=r-1
(*) is \(\chi^{2}_{r-1}(\chi^{2}_{\alpha, r-1}|noncen)=\beta\)
Chow SC, Shao J, Wang H. Sample Size Calculation in Clinical Research. New York: Marcel Dekker, 2003