Class RWLogisticFitAnalysis
Class
RWLogisticFitAnalysis is similar to class
RWLinearRegression, which was described above. To use
RWLogisticFitAnalysis, you specify a logistic regression, either at construction time or via the
setLogisticRegression() member function, and query the object for the various fit analysis quantities. The following example demonstrates the procedure.
RWLogisticRegression model;
.
.
.
RWLogisticFitAnalysis logfit(model);
cout << "Pearson statistic: " << logfit.PearsonStatistic() << endl;
cout << "Pearson statistic p-value: " <<
logfit.PearsonStatisticPValue() << endl;
cout << "Pearson statistic 10% critical value: " <<
logfit.PearsonStatisticCriticalValue(0.10) << endl;
cout << "Pearson statistic degrees of freedom: " <<
logfit.PearsonStatisticDegreesOfFreedom() << endl;
cout << "Predictor data groups for Pearson statistic: " <<
logfit.predictorDataGroups() << endl;
cout << endl;
cout << "HL statistic: " << logfit.HLStatistic() << endl;
cout << "HL statistic p-value: " << logfit.HLStatisticPValue() <<
endl;
cout << "HL statistic 10% critical value: " <<
logfit.HLStatisticCriticalValue(0.10) << endl;
cout << "HL statistic degrees of freedom: " <<
logfit.HLStatisticDegreesOfFreedom() << endl;
cout << "Bin counts for predictions: " <<
logfit.HLStatisticOutputHistogram() << endl;
cout << "Bin counts for predictions associated \n
with positive observations: "
<< logfit.HLStatisticPosObsHistogram() << endl;
cout << endl;
.
.
.