pchisqC {poliscidata}R Documentation

Comparing Logistic Regression Models with Chi-Squared Test

Description

Comparing Logistic Regression Models with Chi-Squared Test

Usage

pchisqC(reduced, full, digits = 3)

Arguments

reduced

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

full

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

digits

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.

Examples

   library(poliscidata)
   
   obama_vote_model_reduced <- svyglm(obama_vote ~ ft_dem + white, design=nesD, 
                                      family="quasibinomial")
   obama_vote_model_full <- svyglm(obama_vote ~ ft_dem + white + (owngun_owngun=="1. Yes"), 
                                   design=nesD, family="quasibinomial")
   pchisqC(obama_vote_model_reduced, obama_vote_model_full)

[Package poliscidata version 2.3.0 Index]