pchisqC: Compares full v. reduced logistic regression models with...

View source: R/pchisqC.r

pchisqCR 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

  • Philip H. Pollock and Barry C. Edwards, An R Companion to Political Analysis, 3rd Edition (Thousand Oaks, CA: Sage Publications, Forthcoming 2022), Chapter 14.

  • Philip H. Pollock and Barry C. Edwards, The Essentials of Political Analysis, 6th Edition (Thousand Oaks, CA: Sage Publications, 2020), Chapter 9. ISBN-13: 978-1506379616; ISBN-10: 150637961.

Examples

   library(RCPA3)
   
   
   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)
   

RCPA3 documentation built on May 29, 2024, 12:19 p.m.

Related to pchisqC in RCPA3...