SourcePro® 2024.1 |
SourcePro® API Reference Guide |
Calculates a number of goodness of fit quantities for a given RWLogisticRegression instance. More...
#include <rw/analytics/logfit.h>
Given RWLogisticRegression instance, class RWLogisticFitAnalysis calculates several goodness of fit quantities, including the G-statistic, Pearson statistic, and Hosmer and Lemeshow statistic, along with their P-values and critical values. These statistics are described in the Business Analysis Module User's Guide.
RWLogisticFitAnalysis::RWLogisticFitAnalysis | ( | ) |
Constructs an empty logistic regression fit analysis object. Behavior is undefined.
RWLogisticFitAnalysis::RWLogisticFitAnalysis | ( | const RWLogisticFitAnalysis & | rhs | ) |
Constructs a copy of rhs.
RWLogisticFitAnalysis::RWLogisticFitAnalysis | ( | const RWLogisticRegression & | reg | ) |
Constructs an analysis object for the logistic regression object reg.
|
inline |
Destructor.
|
inline |
Returns the deviance from the saturated model.
|
inline |
Returns the G statistic value, described in the Business Analysis Module User's Guide, relative to the intercept only model.
|
inline |
Returns the critical value for the G statistic at the specified significance level.
|
inline |
Returns the degrees of freedom for the G statistic test value.
|
inline |
Returns the P-value for the G statistic according to a chi-square distribution.
|
inline |
Returns the Hosmer-Lemeshow test statistic, described in the Business Analysis Module User's Guide.
|
inline |
Returns the critical value for the Hosmer-Lemeshow statistic according to a chi-square distribution.
|
inline |
Returns degrees of freedom for the Hosmer-Lemeshow statistic test value.
|
inline |
Returns the histogram of model predictions used in computing the Hosmer-Lemeshow statistic. This can be used to verify the exact bin boundaries, which can be critical to the statistic's value.
|
inline |
Returns the histogram of model predictions whose corresponding observation value is positive. Seeing this histogram can be very useful for understanding the value for the statistic.
|
inline |
Returns the P-value for the Hosmer-Lemeshow statistic according to a chi-square distribution.
|
inline |
Returns log likelihood of the logistic regression model.
|
inline |
Returns the number of groups used for computing the Hosmer-Lemeshow statistic.
RWLogisticFitAnalysis & RWLogisticFitAnalysis::operator= | ( | const RWLogisticFitAnalysis & | rhs | ) |
Sets self equal to rhs.
|
inline |
Returns the Pearson test statistic. See the Business Analysis Module User's Guide for more information.
|
inline |
Returns the critical value for the Pearson statistic according to a chi-square distribution.
|
inline |
Returns degrees of freedom for the Pearson statistic test value.
|
inline |
Returns the P-value for the Pearson statistic according to a chi-square distribution.
|
inline |
Returns the grouping used for the predictor matrix during computation of a Pearson statistic.
|
inline |
Returns the regression degrees of freedom for a regression model. This is defined as the number of predictor variables in the model.
|
inline |
Returns the residual degrees of freedom for a regression model. This is defined as the number of predictor patterns minus the number of parameters in the regression model.
void RWLogisticFitAnalysis::setLogisticRegression | ( | const RWLogisticRegression & | lr | ) |
Specifies which regression model will be used for the fit analysis.
void RWLogisticFitAnalysis::setModelOutputGroups | ( | size_t | ngroups | ) |
Sets the grouping that should be used for the model's predicted values when computing a Hosmer-Lemeshow statistic. The model's predicted values are organized into a number of equal-mass bins; the number of bins is equal to ngroups.
void RWLogisticFitAnalysis::setPredictorDataGroups | ( | const RWMathVec< size_t > & | groups | ) |
Sets the grouping that should be used for the predictor matrix when computing a Pearson statistic. The length of groups should equal the number of predictor variables in the model. The element groups[k]
specifies the number of equally-spaced groups to be used for predictor variable k
's data. Each element of groups must have a positive (nonzero) value.
Copyright © 2024 Rogue Wave Software, Inc., a Perforce company. All Rights Reserved. |