# NMath User's Guide

43.7 Auxiliary Statistics (.NET, C#, CSharp, VB, Visual Basic, F#)

Class LogisticRegressionAuxiliaryStats computes auxiliary statistics for logistic regressions, such as pseudo R-squared metrics and odds ratios for the computed coefficients.

Code Example – C# logistic regression auxiliary statistics

```var auxStats = new
```
```LogisticRegressionAuxiliaryStats<NewtonRaphsonParameterCalc>( lr );
```

Code Example – VB logistic regression auxiliary statistics

```Dim AuxStats As New LogisticRegressionAuxiliaryStats(Of
```
```  NewtonRaphsonParameterCalc)(LR)
```

Provided properties access the model statistics:

CoxSnell gets the Cox and Snell pseudo R-squared statistic for the model.

Nagelkerke gets the Nagelkerke pseudo R-squared statistic for the model.

LogLikelihoodFullModel gets the log of the value of the likelihood function for the full model (estimated coefficients).

LogLikelihoodInterceptOnly gets the log of the value of the likelihood function for the intercept-only model.

OddsRatios gets the odds ratio values for the computed coefficients. The odds ratio for the intercept parameter, if there is one, is not computed.

Finally, property LikelihoodRatioStat gets the likelihood ratio statistic and related values for the logistic regression. The result is returns as an instance of LikelihoodRatioStatistic.

Code Example – C# logistic regression auxiliary statistics

```var lrs = auxStats.LikelihoodRatioStat;
```
```Console.WriteLine( lrs.ChiSquareStatistic );
```
```Console.WriteLine( lrs.RightTailProbability );
```

Code Example – VB logistic regression auxiliary statistics

```Dim LRS = AuxStats.LikelihoodRatioStat
```
```Console.WriteLine(LRS.ChiSquareStatistic)
```
```Console.WriteLine(LRS.RightTailProbability)

```

Top

Top