library(readxl)
library(tidyverse)
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr 1.1.4 ✔ readr 2.1.5
## ✔ forcats 1.0.0 ✔ stringr 1.5.1
## ✔ ggplot2 3.5.2 ✔ tibble 3.3.0
## ✔ lubridate 1.9.4 ✔ tidyr 1.3.1
## ✔ purrr 1.1.0
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ dplyr::filter() masks stats::filter()
## ✖ dplyr::lag() masks stats::lag()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
library(dplyr)
library(lmtest)
## Loading required package: zoo
##
## Attaching package: 'zoo'
##
## The following objects are masked from 'package:base':
##
## as.Date, as.Date.numeric
library(dplyr)
library(tidyr)
library(readxl)
nonprofitimpacts <- read_excel("nonprofitimpacts2.xlsx")
view(nonprofitimpacts)
head(nonprofitimpacts)
## # A tibble: 6 × 11
## ResponseId ProgDem PplSrv MajGiftAmt CEOrace_White BChairrace_White
## <chr> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 R_6hdrzX5DYuu6hVf 0 300000 500 0 0
## 2 FS_10sszir9xkTX9U5 0 50000 200 0 0
## 3 R_72t5uogX3qcLjlq 0 29000 100 0 0
## 4 R_3lrXJzS0AHM2DqX 0 12000 500 0 0
## 5 FS_3itvPD8YLhTOqWH 0 9000 50 0 0
## 6 FS_5xwR3CqoL2qwfwb 0 8200 100 0 0
## # ℹ 5 more variables: PercentDemPOCBoard <dbl>, Northeast <dbl>, Midwest <dbl>,
## # South <dbl>, West <dbl>
cor(nonprofitimpacts$CEOrace_White, nonprofitimpacts$BChairrace_White, method = "pearson")
## [1] 0.4796578
cor(nonprofitimpacts$CEOrace_White, nonprofitimpacts$PercentDemPOCBoard, method = "pearson")
## [1] -0.8324081
#included in case of needing to change variables…shows a strong negative relationship
plot(nonprofitimpacts$CEOrace_White, nonprofitimpacts$BChairrace_White)
model <- lm(nonprofitimpacts$CEOrace_White~nonprofitimpacts$BChairrace_White, data=nonprofitimpacts)
summary(model)
##
## Call:
## lm(formula = nonprofitimpacts$CEOrace_White ~ nonprofitimpacts$BChairrace_White,
## data = nonprofitimpacts)
##
## Residuals:
## Min 1Q Median 3Q Max
## -0.94225 0.05775 0.05775 0.05775 0.47320
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 0.52680 0.01323 39.81 <2e-16 ***
## nonprofitimpacts$BChairrace_White 0.41545 0.01486 27.96 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.3078 on 2617 degrees of freedom
## Multiple R-squared: 0.2301, Adjusted R-squared: 0.2298
## F-statistic: 782 on 1 and 2617 DF, p-value: < 2.2e-16
plot(lm(nonprofitimpacts$CEOrace_White~nonprofitimpacts$BChairrace_White, data=nonprofitimpacts))
summary(nonprofitimpacts)
## ResponseId ProgDem PplSrv MajGiftAmt
## Length:2619 Min. : 0.000 Min. :0.000e+00 Min. : 0
## Class :character 1st Qu.: 0.000 1st Qu.:3.420e+02 1st Qu.: 500
## Mode :character Median : 0.000 Median :1.500e+03 Median : 1000
## Mean : 2.704 Mean :1.575e+06 Mean : 3557
## 3rd Qu.: 5.000 3rd Qu.:7.500e+03 3rd Qu.: 5000
## Max. :10.000 Max. :4.000e+09 Max. :200000
## CEOrace_White BChairrace_White PercentDemPOCBoard Northeast
## Min. :0.0000 Min. :0.0000 Min. : 0.000 Min. :0.0000
## 1st Qu.:1.0000 1st Qu.:1.0000 1st Qu.: 0.000 1st Qu.:0.0000
## Median :1.0000 Median :1.0000 Median : 1.000 Median :0.0000
## Mean :0.8564 Mean :0.7934 Mean : 2.471 Mean :0.1798
## 3rd Qu.:1.0000 3rd Qu.:1.0000 3rd Qu.: 4.000 3rd Qu.:0.0000
## Max. :1.0000 Max. :1.0000 Max. :11.000 Max. :1.0000
## Midwest South West
## Min. :0.0000 Min. :0.0000 Min. :0.0000
## 1st Qu.:0.0000 1st Qu.:0.0000 1st Qu.:0.0000
## Median :0.0000 Median :0.0000 Median :0.0000
## Mean :0.1333 Mean :0.3765 Mean :0.3104
## 3rd Qu.:0.0000 3rd Qu.:1.0000 3rd Qu.:1.0000
## Max. :1.0000 Max. :1.0000 Max. :1.0000
logmodel <- glm(CEOrace_White ~ BChairrace_White, data = nonprofitimpacts, family = binomial)
summary(logmodel)
##
## Call:
## glm(formula = CEOrace_White ~ BChairrace_White, family = binomial,
## data = nonprofitimpacts)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 0.10731 0.08611 1.246 0.213
## BChairrace_White 2.68488 0.12751 21.056 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 2154.8 on 2618 degrees of freedom
## Residual deviance: 1665.8 on 2617 degrees of freedom
## AIC: 1669.8
##
## Number of Fisher Scoring iterations: 5
#the estimate shows a positive and significant likelihood that having a White Board Chair results in having a White CEO
logmodelboard <- glm(CEOrace_White ~ BChairrace_White + PercentDemPOCBoard, data = nonprofitimpacts, family = binomial)
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
summary(logmodelboard)
##
## Call:
## glm(formula = CEOrace_White ~ BChairrace_White + PercentDemPOCBoard,
## family = binomial, data = nonprofitimpacts)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 235.381 68867.955 0.003 0.997
## BChairrace_White -6.062 67350.225 0.000 1.000
## PercentDemPOCBoard -41.718 2900.844 -0.014 0.989
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 2.1548e+03 on 2618 degrees of freedom
## Residual deviance: 3.5587e-07 on 2616 degrees of freedom
## AIC: 6
##
## Number of Fisher Scoring iterations: 25
#AIC and residual deviance went down A LOT indicating this variable is a good match for the model? however, there is no longer any significance, so may not include it after all…?
logmodelboard2 <- glm(CEOrace_White ~ BChairrace_White * PercentDemPOCBoard, data = nonprofitimpacts, family = binomial)
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
summary(logmodelboard2)
##
## Call:
## glm(formula = CEOrace_White ~ BChairrace_White * PercentDemPOCBoard,
## family = binomial, data = nonprofitimpacts)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 135.15 33713.65 0.004 0.997
## BChairrace_White 96.54 38060.56 0.003 0.998
## PercentDemPOCBoard -22.53 5553.25 -0.004 0.997
## BChairrace_White:PercentDemPOCBoard -19.62 6435.75 -0.003 0.998
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 2.1548e+03 on 2618 degrees of freedom
## Residual deviance: 3.1176e-07 on 2615 degrees of freedom
## AIC: 8
##
## Number of Fisher Scoring iterations: 25
#negative and insignicant? is this due to the warnings?
numeric_clean_nonprofitimpacts <-nonprofitimpacts |> dplyr::select(where(is.numeric)) |> drop_na()
head(numeric_clean_nonprofitimpacts)
## # A tibble: 6 × 10
## ProgDem PplSrv MajGiftAmt CEOrace_White BChairrace_White PercentDemPOCBoard
## <dbl> <dbl> <dbl> <dbl> <dbl> <dbl>
## 1 0 300000 500 0 0 11
## 2 0 50000 200 0 0 11
## 3 0 29000 100 0 0 11
## 4 0 12000 500 0 0 11
## 5 0 9000 50 0 0 11
## 6 0 8200 100 0 0 11
## # ℹ 4 more variables: Northeast <dbl>, Midwest <dbl>, South <dbl>, West <dbl>
pairs(numeric_clean_nonprofitimpacts)
library(corrplot)
## corrplot 0.95 loaded
cor_matrix<-cor(numeric_clean_nonprofitimpacts)
print(cor_matrix)
## ProgDem PplSrv MajGiftAmt CEOrace_White
## ProgDem 1.000000000 0.012579222 -0.019600838 0.312820497
## PplSrv 0.012579222 1.000000000 -0.007674248 0.007982210
## MajGiftAmt -0.019600838 -0.007674248 1.000000000 -0.045970434
## CEOrace_White 0.312820497 0.007982210 -0.045970434 1.000000000
## BChairrace_White 0.087873766 0.009910354 -0.068361879 0.479657846
## PercentDemPOCBoard 0.186347158 -0.003205582 -0.005820621 -0.832408149
## Northeast 0.005494136 -0.009201927 -0.003029647 0.013098252
## Midwest -0.009077886 -0.007801186 -0.036753093 0.003539274
## South -0.035154016 -0.015050129 0.015981640 -0.043699239
## West 0.038920651 0.029129174 0.012775975 0.032289149
## BChairrace_White PercentDemPOCBoard Northeast
## ProgDem 0.087873766 0.186347158 0.005494136
## PplSrv 0.009910354 -0.003205582 -0.009201927
## MajGiftAmt -0.068361879 -0.005820621 -0.003029647
## CEOrace_White 0.479657846 -0.832408149 0.013098252
## BChairrace_White 1.000000000 -0.561372505 0.030189292
## PercentDemPOCBoard -0.561372505 1.000000000 -0.012280545
## Northeast 0.030189292 -0.012280545 1.000000000
## Midwest 0.008580858 0.002599163 -0.183608634
## South -0.066817068 0.024185101 -0.363863657
## West 0.038607674 -0.017041807 -0.314180853
## Midwest South West
## ProgDem -0.009077886 -0.03515402 0.03892065
## PplSrv -0.007801186 -0.01505013 0.02912917
## MajGiftAmt -0.036753093 0.01598164 0.01277598
## CEOrace_White 0.003539274 -0.04369924 0.03228915
## BChairrace_White 0.008580858 -0.06681707 0.03860767
## PercentDemPOCBoard 0.002599163 0.02418510 -0.01704181
## Northeast -0.183608634 -0.36386366 -0.31418085
## Midwest 1.000000000 -0.30468084 -0.26307900
## South -0.304680844 1.00000000 -0.52135287
## West -0.263079001 -0.52135287 1.00000000
corrplot(cor_matrix, method = "number")
#PercentDemPOCBoard may be colinear with CEOrace_White??
library(pastecs)
##
## Attaching package: 'pastecs'
## The following objects are masked from 'package:dplyr':
##
## first, last
## The following object is masked from 'package:tidyr':
##
## extract
stat.desc(numeric_clean_nonprofitimpacts)
## ProgDem PplSrv MajGiftAmt CEOrace_White
## nbr.val 2.619000e+03 2.619000e+03 2.619000e+03 2.619000e+03
## nbr.null 1.389000e+03 3.000000e+00 4.000000e+00 3.760000e+02
## nbr.na 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
## min 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
## max 1.000000e+01 4.000000e+09 2.000000e+05 1.000000e+00
## range 1.000000e+01 4.000000e+09 2.000000e+05 1.000000e+00
## sum 7.081000e+03 4.125093e+09 9.315292e+06 2.243000e+03
## median 0.000000e+00 1.500000e+03 1.000000e+03 1.000000e+00
## mean 2.703704e+00 1.575064e+06 3.556813e+03 8.564338e-01
## SE.mean 6.916054e-02 1.527309e+06 1.726240e+02 6.853118e-03
## CI.mean.0.95 1.356149e-01 2.994856e+06 3.384933e+02 1.343808e-02
## var 1.252715e+01 6.109272e+15 7.804370e+07 1.230019e-01
## std.dev 3.539371e+00 7.816183e+07 8.834234e+03 3.507163e-01
## coef.var 1.309082e+00 4.962453e+01 2.483750e+00 4.095078e-01
## BChairrace_White PercentDemPOCBoard Northeast Midwest
## nbr.val 2.619000e+03 2.619000e+03 2.619000e+03 2.619000e+03
## nbr.null 5.410000e+02 7.710000e+02 2.148000e+03 2.270000e+03
## nbr.na 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
## min 0.000000e+00 0.000000e+00 0.000000e+00 0.000000e+00
## max 1.000000e+00 1.100000e+01 1.000000e+00 1.000000e+00
## range 1.000000e+00 1.100000e+01 1.000000e+00 1.000000e+00
## sum 2.078000e+03 6.471000e+03 4.710000e+02 3.490000e+02
## median 1.000000e+00 1.000000e+00 0.000000e+00 0.000000e+00
## mean 7.934326e-01 2.470790e+00 1.798396e-01 1.332570e-01
## SE.mean 7.912270e-03 5.655253e-02 7.505978e-03 6.642099e-03
## CI.mean.0.95 1.551494e-02 1.108922e-01 1.471825e-02 1.302430e-02
## var 1.639599e-01 8.376056e+00 1.475537e-01 1.155437e-01
## std.dev 4.049196e-01 2.894142e+00 3.841272e-01 3.399171e-01
## coef.var 5.103390e-01 1.171342e+00 2.135943e+00 2.550840e+00
## South West
## nbr.val 2.619000e+03 2.619000e+03
## nbr.null 1.633000e+03 1.806000e+03
## nbr.na 0.000000e+00 0.000000e+00
## min 0.000000e+00 0.000000e+00
## max 1.000000e+00 1.000000e+00
## range 1.000000e+00 1.000000e+00
## sum 9.860000e+02 8.130000e+02
## median 0.000000e+00 0.000000e+00
## mean 3.764796e-01 3.104238e-01
## SE.mean 9.469155e-03 9.042402e-03
## CI.mean.0.95 1.856779e-02 1.773098e-02
## var 2.348324e-01 2.141426e-01
## std.dev 4.845951e-01 4.627555e-01
## coef.var 1.287175e+00 1.490722e+00
summary(numeric_clean_nonprofitimpacts)
## ProgDem PplSrv MajGiftAmt CEOrace_White
## Min. : 0.000 Min. :0.000e+00 Min. : 0 Min. :0.0000
## 1st Qu.: 0.000 1st Qu.:3.420e+02 1st Qu.: 500 1st Qu.:1.0000
## Median : 0.000 Median :1.500e+03 Median : 1000 Median :1.0000
## Mean : 2.704 Mean :1.575e+06 Mean : 3557 Mean :0.8564
## 3rd Qu.: 5.000 3rd Qu.:7.500e+03 3rd Qu.: 5000 3rd Qu.:1.0000
## Max. :10.000 Max. :4.000e+09 Max. :200000 Max. :1.0000
## BChairrace_White PercentDemPOCBoard Northeast Midwest
## Min. :0.0000 Min. : 0.000 Min. :0.0000 Min. :0.0000
## 1st Qu.:1.0000 1st Qu.: 0.000 1st Qu.:0.0000 1st Qu.:0.0000
## Median :1.0000 Median : 1.000 Median :0.0000 Median :0.0000
## Mean :0.7934 Mean : 2.471 Mean :0.1798 Mean :0.1333
## 3rd Qu.:1.0000 3rd Qu.: 4.000 3rd Qu.:0.0000 3rd Qu.:0.0000
## Max. :1.0000 Max. :11.000 Max. :1.0000 Max. :1.0000
## South West
## Min. :0.0000 Min. :0.0000
## 1st Qu.:0.0000 1st Qu.:0.0000
## Median :0.0000 Median :0.0000
## Mean :0.3765 Mean :0.3104
## 3rd Qu.:1.0000 3rd Qu.:1.0000
## Max. :1.0000 Max. :1.0000
logmodelboard <- glm(CEOrace_White ~ BChairrace_White + ProgDem + PplSrv + MajGiftAmt + PercentDemPOCBoard + Northeast + South + West, data = numeric_clean_nonprofitimpacts, family = binomial)
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
summary(logmodelboard)
##
## Call:
## glm(formula = CEOrace_White ~ BChairrace_White + ProgDem + PplSrv +
## MajGiftAmt + PercentDemPOCBoard + Northeast + South + West,
## family = binomial, data = numeric_clean_nonprofitimpacts)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 4.242e+01 4.969e+04 0.001 0.999
## BChairrace_White -8.639e+00 4.658e+04 0.000 1.000
## ProgDem 3.881e+00 1.512e+03 0.003 0.998
## PplSrv -1.762e-09 9.100e-05 0.000 1.000
## MajGiftAmt -9.907e-05 4.305e-01 0.000 1.000
## PercentDemPOCBoard -9.551e+00 2.517e+03 -0.004 0.997
## Northeast -2.106e-01 1.820e+04 0.000 1.000
## South -5.093e-01 1.665e+04 0.000 1.000
## West -4.331e-01 1.698e+04 0.000 1.000
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 2.1548e+03 on 2618 degrees of freedom
## Residual deviance: 2.6352e-08 on 2610 degrees of freedom
## AIC: 18
##
## Number of Fisher Scoring iterations: 25
logmodelboard2 <- glm(CEOrace_White ~ BChairrace_White + ProgDem + PplSrv + MajGiftAmt + Northeast + South + West, data = numeric_clean_nonprofitimpacts, family = binomial)
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
summary(logmodelboard2)
##
## Call:
## glm(formula = CEOrace_White ~ BChairrace_White + ProgDem + PplSrv +
## MajGiftAmt + Northeast + South + West, family = binomial,
## data = numeric_clean_nonprofitimpacts)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) -1.109e+00 2.350e-01 -4.717 2.39e-06 ***
## BChairrace_White 3.181e+00 1.613e-01 19.726 < 2e-16 ***
## ProgDem 1.745e+01 5.138e+02 0.034 0.973
## PplSrv 1.235e-07 1.444e-07 0.855 0.392
## MajGiftAmt -2.820e-06 7.377e-06 -0.382 0.702
## Northeast -7.995e-02 2.746e-01 -0.291 0.771
## South -1.386e-03 2.415e-01 -0.006 0.995
## West -1.172e-02 2.526e-01 -0.046 0.963
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 2154.8 on 2618 degrees of freedom
## Residual deviance: 1122.6 on 2611 degrees of freedom
## AIC: 1138.6
##
## Number of Fisher Scoring iterations: 22
#Boardchairrace_White is statistically significant indicating a strong positive relationship in which nonprofits with a White Board chair increases the likelihood of them having a White CEO by 3.181 or 24 times.
logmodelboard3 <- glm(CEOrace_White ~ ProgDem + PplSrv + MajGiftAmt + PercentDemPOCBoard + Northeast + South + West, data = numeric_clean_nonprofitimpacts, family = binomial)
## Warning: glm.fit: algorithm did not converge
## Warning: glm.fit: fitted probabilities numerically 0 or 1 occurred
summary(logmodelboard)
##
## Call:
## glm(formula = CEOrace_White ~ BChairrace_White + ProgDem + PplSrv +
## MajGiftAmt + PercentDemPOCBoard + Northeast + South + West,
## family = binomial, data = numeric_clean_nonprofitimpacts)
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 4.242e+01 4.969e+04 0.001 0.999
## BChairrace_White -8.639e+00 4.658e+04 0.000 1.000
## ProgDem 3.881e+00 1.512e+03 0.003 0.998
## PplSrv -1.762e-09 9.100e-05 0.000 1.000
## MajGiftAmt -9.907e-05 4.305e-01 0.000 1.000
## PercentDemPOCBoard -9.551e+00 2.517e+03 -0.004 0.997
## Northeast -2.106e-01 1.820e+04 0.000 1.000
## South -5.093e-01 1.665e+04 0.000 1.000
## West -4.331e-01 1.698e+04 0.000 1.000
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 2.1548e+03 on 2618 degrees of freedom
## Residual deviance: 2.6352e-08 on 2610 degrees of freedom
## AIC: 18
##
## Number of Fisher Scoring iterations: 25
library(brglm2)
firthlogmodel<- glm(CEOrace_White ~ BChairrace_White + ProgDem + PplSrv + MajGiftAmt + PercentDemPOCBoard + Northeast + South + West, data = numeric_clean_nonprofitimpacts, family = binomial, method = brglmFit, control = glm.control(maxit = 50))
## Warning: brglmFit: algorithm did not converge. Try changing the optimization
## algorithm defaults, e.g. the defaults for one or more of `maxit`, `epsilon`,
## `slowit`, and `response_adjustment`; see `?brglm_control` for default values
## and available options
## Warning: brglmFit: fitted probabilities numerically 0 or 1 occurred
summary(firthlogmodel)
##
## Call:
## glm(formula = CEOrace_White ~ BChairrace_White + ProgDem + PplSrv +
## MajGiftAmt + PercentDemPOCBoard + Northeast + South + West,
## family = binomial, data = numeric_clean_nonprofitimpacts,
## control = glm.control(maxit = 50), method = brglmFit)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -2.107e-08 2.107e-08 2.107e-08 2.107e-08 2.107e-08
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 1.251e+14 5.484e+06 22812211 <2e-16 ***
## BChairrace_White -2.314e+12 4.049e+06 -571539 <2e-16 ***
## ProgDem 2.721e+13 3.885e+05 70047925 <2e-16 ***
## PplSrv 2.288e+05 1.679e-02 13628078 <2e-16 ***
## MajGiftAmt 8.674e+08 1.491e+02 5816038 <2e-16 ***
## PercentDemPOCBoard -6.908e+13 5.723e+05 -120711381 <2e-16 ***
## Northeast 1.472e+12 4.742e+06 310329 <2e-16 ***
## South 1.463e+13 4.185e+06 3495523 <2e-16 ***
## West -4.670e+12 4.300e+06 -1086144 <2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for binomial family taken to be 1)
##
## Null deviance: 2.1548e+03 on 2618 degrees of freedom
## Residual deviance: 1.1631e-12 on 2610 degrees of freedom
## AIC: 18
##
## Type of estimator: AS_mixed (mixed bias-reducing adjusted score equations)
## Number of Fisher Scoring iterations: 50
library("Hmisc")
##
## Attaching package: 'Hmisc'
## The following objects are masked from 'package:dplyr':
##
## src, summarize
## The following objects are masked from 'package:base':
##
## format.pval, units
res2 <- rcorr(as.matrix(numeric_clean_nonprofitimpacts))
res2
## ProgDem PplSrv MajGiftAmt CEOrace_White BChairrace_White
## ProgDem 1.00 0.01 -0.02 0.31 0.09
## PplSrv 0.01 1.00 -0.01 0.01 0.01
## MajGiftAmt -0.02 -0.01 1.00 -0.05 -0.07
## CEOrace_White 0.31 0.01 -0.05 1.00 0.48
## BChairrace_White 0.09 0.01 -0.07 0.48 1.00
## PercentDemPOCBoard 0.19 0.00 -0.01 -0.83 -0.56
## Northeast 0.01 -0.01 0.00 0.01 0.03
## Midwest -0.01 -0.01 -0.04 0.00 0.01
## South -0.04 -0.02 0.02 -0.04 -0.07
## West 0.04 0.03 0.01 0.03 0.04
## PercentDemPOCBoard Northeast Midwest South West
## ProgDem 0.19 0.01 -0.01 -0.04 0.04
## PplSrv 0.00 -0.01 -0.01 -0.02 0.03
## MajGiftAmt -0.01 0.00 -0.04 0.02 0.01
## CEOrace_White -0.83 0.01 0.00 -0.04 0.03
## BChairrace_White -0.56 0.03 0.01 -0.07 0.04
## PercentDemPOCBoard 1.00 -0.01 0.00 0.02 -0.02
## Northeast -0.01 1.00 -0.18 -0.36 -0.31
## Midwest 0.00 -0.18 1.00 -0.30 -0.26
## South 0.02 -0.36 -0.30 1.00 -0.52
## West -0.02 -0.31 -0.26 -0.52 1.00
##
## n= 2619
##
##
## P
## ProgDem PplSrv MajGiftAmt CEOrace_White BChairrace_White
## ProgDem 0.5199 0.3160 0.0000 0.0000
## PplSrv 0.5199 0.6946 0.6830 0.6122
## MajGiftAmt 0.3160 0.6946 0.0186 0.0005
## CEOrace_White 0.0000 0.6830 0.0186 0.0000
## BChairrace_White 0.0000 0.6122 0.0005 0.0000
## PercentDemPOCBoard 0.0000 0.8698 0.7659 0.0000 0.0000
## Northeast 0.7787 0.6379 0.8768 0.5028 0.1224
## Midwest 0.6424 0.6899 0.0600 0.8563 0.6607
## South 0.0721 0.4414 0.4136 0.0253 0.0006
## West 0.0464 0.1361 0.5134 0.0985 0.0482
## PercentDemPOCBoard Northeast Midwest South West
## ProgDem 0.0000 0.7787 0.6424 0.0721 0.0464
## PplSrv 0.8698 0.6379 0.6899 0.4414 0.1361
## MajGiftAmt 0.7659 0.8768 0.0600 0.4136 0.5134
## CEOrace_White 0.0000 0.5028 0.8563 0.0253 0.0985
## BChairrace_White 0.0000 0.1224 0.6607 0.0006 0.0482
## PercentDemPOCBoard 0.5299 0.8942 0.2160 0.3833
## Northeast 0.5299 0.0000 0.0000 0.0000
## Midwest 0.8942 0.0000 0.0000 0.0000
## South 0.2160 0.0000 0.0000 0.0000
## West 0.3833 0.0000 0.0000 0.0000