Delaware District Wealth Index


United States Population Analysis

Top 10 Most Populous States

State Area vs Population

Distribution of State Populations

Average Population by Region

Population and Land Area Relationship


Affairs Dataset Logistic Regression Analysis

## 
## Table 1: Descriptive Statistics
## ===============================================
## Statistic      N    Mean   St. Dev.  Min   Max 
## -----------------------------------------------
## rownames      601 1,059.72  914.90    4   9,029
## affairs       601   1.46     3.30     0    12  
## age           601  32.49     9.29   17.50 57.00
## yearsmarried  601   8.18     5.57   0.12  15.00
## religiousness 601   3.12     1.17     1     5  
## education     601  16.17     2.40     9    20  
## occupation    601   4.19     1.82     1     7  
## rating        601   3.93     1.10     1     5  
## -----------------------------------------------

Logistic Regression Model

Characteristic OR 95% CI p-value
gender


    female
    male 1.39 0.94, 2.06 0.10
age 0.96 0.93, 0.99 0.024
yearsmarried 1.10 1.03, 1.16 0.003
children


    no
    yes 1.54 0.90, 2.69 0.12
Abbreviations: CI = Confidence Interval, OR = Odds Ratio

Predicted Probability of Affair

Full Logistic Regression Model

Characteristic OR 95% CI p-value
gender


    female
    male 1.32 0.83, 2.12 0.2
age 0.96 0.92, 0.99 0.015
yearsmarried 1.10 1.03, 1.17 0.003
children


    no
    yes 1.49 0.85, 2.66 0.2
religiousness 0.72 0.60, 0.86 <0.001
education 1.02 0.93, 1.13 0.7
occupation 1.03 0.90, 1.19 0.7
rating 0.63 0.52, 0.75 <0.001
Abbreviations: CI = Confidence Interval, OR = Odds Ratio

Marital Satisfaction and Affair Probability

Retirement Prediction and Interaction Models

Baseline Logistic Regression Model

## 
## Call:
## glm(formula = retired ~ tenure + workload + president_aligned + 
##     senate_aligned + eligible_pension, family = binomial(link = "logit"), 
##     data = data)
## 
## Coefficients:
##                     Estimate Std. Error z value Pr(>|z|)    
## (Intercept)        -7.102490   0.754734  -9.411  < 2e-16 ***
## tenure              0.334379   0.028608  11.688  < 2e-16 ***
## workload            0.028731   0.004709   6.101 1.05e-09 ***
## president_aligned1  0.814210   0.269594   3.020  0.00253 ** 
## senate_aligned1    -0.132452   0.263722  -0.502  0.61550    
## eligible_pension1   1.532615   0.290314   5.279 1.30e-07 ***
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 845.58  on 799  degrees of freedom
## Residual deviance: 372.34  on 794  degrees of freedom
## AIC: 384.34
## 
## Number of Fisher Scoring iterations: 7

First Differences

## 
##  Estimate Std. Error    z Pr(>|z|)   S  2.5 % 97.5 %
##    0.0598     0.0193 3.11   0.0019 9.0 0.0221 0.0976
## 
## Term: president_aligned
## Type: response
## Comparison: 1 - 0
## 
##  Estimate Std. Error    z Pr(>|z|)   S   2.5 % 97.5 %
##    0.0213    0.00787 2.71  0.00682 7.2 0.00587 0.0367
## 
## Term: workload
## Type: response
## Comparison: 120 - 80

Continuous × Continuous Interaction

Continuous × Categorical Interaction

Marginal Effects Across Tenure

Categorical × Categorical Interaction

Marginal Effect Visualization

Model Fit Evaluation

##         Predicted
## Observed   0   1
##        0 135  42
##        1  34 589
## [1] 0.905