pchisqC {RCPA3}R Documentation

Compares full v. reduced logistic regression models with Chi-Squared test

Description

Compares full and reduced logistic regression models with Chi-Square Test to assess whether additional variables of full model are statistically significant.

Usage

pchisqC(reduced, full, digits = 3)

Arguments

reduced

The reduced logistic regression model as an object. This is model with fewer independent variables.

full

The full logistic regression model as an object. This is model with more independent variables.

digits

(Optional) The number of digits to display after decimal point, default is 3.

Value

The chi-squared statistic, df, and p-value as a vector of numbers to test null hypothesis that full model no better than reduced model.

Textbook References

Examples

   library(RCPA3)
   
   ## Not run: 
   model_full <- logregC(battleground2020 ~ vep16.turnout + adv.or.more, data=states)
   model_reduced <- logregC(battleground2020 ~ vep16.turnout, data=states)
   
   pchisqC(reduced=model_reduced, full=model_full)
   
## End(Not run)

[Package RCPA3 version 1.3.1 Index]