1 Clear Environment

Start with a clean slate.

# Clear the workspace

  rm(list = ls()) # Clear all files from your environment
  gc()            # Clear unused memory
##          used (Mb) gc trigger (Mb) limit (Mb) max used (Mb)
## Ncells 525506 28.1    1166812 62.4         NA   669265 35.8
## Vcells 965911  7.4    8388608 64.0      32768  1840568 14.1
  cat("\f")       # Clear the console
  graphics.off()  # Clear all graphs

1.1 Load packages

Now, I will load the packages.

# Prepare needed libraries

packages <- c("reader",      # importing .txt file,
              "readxl",      # importing xlsx file,
              "psych",       # quick summary stats for data exploration,
              "mice",        # for imputation of missing values and vis of missing data,
              "stargazer",   # summary stats,
              "vtable",      # summary stats,
              "summarytools",# summary stats,
              "naniar",      # for visualisation of missing data,
              "visdat",      # for visualisation of missing data,
              "VIM",         # for visualisation of missing data,
              "DataExplorer",# for visualisation of missing data,
              "tidyverse",   # data manipulation like selecting variables,
              "fastDummies", # Create dummy variables using fastDummies,
              "corrplot",    # correlation plots,
              "ggplot2",     # graphing,
              "data.table",  # reshape for graphing, 
              "car"          # vif for multicollinearity
              )

for (i in 1:length(packages)) {
  if (!packages[i] %in% rownames(installed.packages())) {
    install.packages(packages[i]
                     , repos = "http://cran.rstudio.com/"
                     , dependencies = TRUE
                     )
  }
  library(packages[i], character.only = TRUE)
}
## Loading required package: NCmisc
## 
## Attaching package: 'reader'
## The following objects are masked from 'package:NCmisc':
## 
##     cat.path, get.ext, rmv.ext
## 
## Attaching package: 'mice'
## The following object is masked from 'package:stats':
## 
##     filter
## The following objects are masked from 'package:base':
## 
##     cbind, rbind
## 
## Please cite as:
##  Hlavac, Marek (2022). stargazer: Well-Formatted Regression and Summary Statistics Tables.
##  R package version 5.2.3. https://CRAN.R-project.org/package=stargazer
## Loading required package: kableExtra
## 
## Attaching package: 'vtable'
## The following object is masked from 'package:NCmisc':
## 
##     pctile
## Loading required package: colorspace
## Loading required package: grid
## VIM is ready to use.
## Suggestions and bug-reports can be submitted at: https://github.com/statistikat/VIM/issues
## 
## Attaching package: 'VIM'
## The following object is masked from 'package:vtable':
## 
##     countNA
## The following object is masked from 'package:datasets':
## 
##     sleep
## ── Attaching core tidyverse packages ──────────────────────── tidyverse 2.0.0 ──
## ✔ dplyr     1.1.2     ✔ readr     2.1.4
## ✔ forcats   1.0.0     ✔ stringr   1.5.0
## ✔ ggplot2   3.4.2     ✔ tibble    3.2.1
## ✔ lubridate 1.9.2     ✔ tidyr     1.3.0
## ✔ purrr     1.0.1     
## ── Conflicts ────────────────────────────────────────── tidyverse_conflicts() ──
## ✖ ggplot2::%+%()      masks psych::%+%()
## ✖ ggplot2::alpha()    masks psych::alpha()
## ✖ dplyr::filter()     masks mice::filter(), stats::filter()
## ✖ dplyr::group_rows() masks kableExtra::group_rows()
## ✖ dplyr::lag()        masks stats::lag()
## ✖ tibble::view()      masks summarytools::view()
## ℹ Use the conflicted package (<http://conflicted.r-lib.org/>) to force all conflicts to become errors
## corrplot 0.92 loaded
## 
## 
## Attaching package: 'data.table'
## 
## 
## The following objects are masked from 'package:lubridate':
## 
##     hour, isoweek, mday, minute, month, quarter, second, wday, week,
##     yday, year
## 
## 
## The following objects are masked from 'package:dplyr':
## 
##     between, first, last
## 
## 
## The following object is masked from 'package:purrr':
## 
##     transpose
## 
## 
## Loading required package: carData
## 
## 
## Attaching package: 'car'
## 
## 
## The following object is masked from 'package:dplyr':
## 
##     recode
## 
## 
## The following object is masked from 'package:purrr':
## 
##     some
## 
## 
## The following object is masked from 'package:psych':
## 
##     logit
rm(packages)

2 Import Data

Confirm 2019 data.

getwd()  
## [1] "/Users/arvindsharma/Library/CloudStorage/GoogleDrive-sharmaar@bc.edu/My Drive/Directed Practicum/Thomas/arvind/scripts"
setwd("~/Library/CloudStorage/GoogleDrive-sharmaar@bc.edu/My Drive/Directed Practicum/Thomas/arvind/")
  
# import data 

## PPP
public_150k_plus_2019 <- read.csv(file = "raw_data/public_150k_plus_230630.csv")


setwd("~/Library/CloudStorage/GoogleDrive-sharmaar@bc.edu/My Drive/Directed Practicum/Thomas/arvind/")
## EIN
ein_data <- readr::read_delim("raw_data/ein/ein_data_edited.txt",
                        delim = "|", 
                        escape_double = FALSE, 
                        trim_ws = TRUE
                       )
## Rows: 1287563 Columns: 6
## ── Column specification ────────────────────────────────────────────────────────
## Delimiter: "|"
## chr (6): ID, ORGANISATION, CITY, STATE, COUNTRY, PF
## 
## ℹ Use `spec()` to retrieve the full column specification for this data.
## ℹ Specify the column types or set `show_col_types = FALSE` to quiet this message.
class(ein_data)
## [1] "spec_tbl_df" "tbl_df"      "tbl"         "data.frame"
ein_data <- as.data.frame(ein_data)


## FORM 990
eoextract_990_2019 <- readxl::read_excel("raw_data/form990/19eoextract990.xlsx")
eoextract_ez_2019  <- readxl::read_excel("raw_data/form990/19eoextractez.xlsx")

3 PPP Data

3.1 Basic Exploration

  • Calendar Year or Fiscal Year ??? Thomas.
  • BusinessType and ForProfit filters…AS.
  • ForgivenessAmount, ApprovalAmounts
  • Most people using the loan for payroll only inspite of the 75% min limit….
  • 700 that took the loan/signed ; 532 that did not takje the treatment.
str(public_150k_plus_2019)
## 'data.frame':    965552 obs. of  53 variables:
##  $ LoanNumber                 : num  9.55e+09 9.78e+09 5.79e+09 6.22e+09 9.66e+09 ...
##  $ DateApproved               : chr  "05/01/2020" "05/01/2020" "05/01/2020" "05/01/2020" ...
##  $ SBAOfficeCode              : int  464 464 1013 920 101 101 491 101 101 101 ...
##  $ ProcessingMethod           : chr  "PPP" "PPP" "PPP" "PPP" ...
##  $ BorrowerName               : chr  "SUMTER COATINGS, INC." "PLEASANT PLACES, INC." "BOYER CHILDREN'S CLINIC" "KIRTLEY CONSTRUCTION INC" ...
##  $ BorrowerAddress            : chr  "2410 Highway 15 South" "7684 Southrail Road" "1850 BOYER AVE E" "1661 MARTIN RANCH RD" ...
##  $ BorrowerCity               : chr  "Sumter" "North Charleston" "SEATTLE" "SAN BERNARDINO" ...
##  $ BorrowerState              : chr  "" "" "" "" ...
##  $ BorrowerZip                : chr  "29150-9662" "29420-9000" "98112-2922" "92407-1740" ...
##  $ LoanStatusDate             : chr  "12/18/2020" "09/28/2021" "03/17/2021" "10/16/2021" ...
##  $ LoanStatus                 : chr  "Paid in Full" "Paid in Full" "Paid in Full" "Paid in Full" ...
##  $ Term                       : int  24 24 24 24 24 24 24 24 24 24 ...
##  $ SBAGuarantyPercentage      : int  100 100 100 100 100 100 100 100 100 100 ...
##  $ InitialApprovalAmount      : num  769359 736928 691355 499871 367437 ...
##  $ CurrentApprovalAmount      : num  769359 736928 691355 499871 367437 ...
##  $ UndisbursedAmount          : num  0 0 0 0 0 0 0 0 0 0 ...
##  $ FranchiseName              : chr  "" "" "" "" ...
##  $ ServicingLenderLocationID  : int  19248 19248 9551 9551 57328 57328 19248 57328 57328 57328 ...
##  $ ServicingLenderName        : chr  "Synovus Bank" "Synovus Bank" "Bank of America, National Association" "Bank of America, National Association" ...
##  $ ServicingLenderAddress     : chr  "1148 Broadway" "1148 Broadway" "100 N Tryon St, Ste 170" "100 N Tryon St, Ste 170" ...
##  $ ServicingLenderCity        : chr  "COLUMBUS" "COLUMBUS" "CHARLOTTE" "CHARLOTTE" ...
##  $ ServicingLenderState       : chr  "GA" "GA" "NC" "NC" ...
##  $ ServicingLenderZip         : chr  "31901-2429" "31901-2429" "28202-4024" "28202-4024" ...
##  $ RuralUrbanIndicator        : chr  "U" "U" "U" "U" ...
##  $ HubzoneIndicator           : chr  "N" "Y" "N" "N" ...
##  $ LMIIndicator               : chr  "N" "Y" "N" "N" ...
##  $ BusinessAgeDescription     : chr  "Existing or more than 2 years old" "Existing or more than 2 years old" "New Business or 2 years or less" "New Business or 2 years or less" ...
##  $ ProjectCity                : chr  "Sumter" "North Charleston" "SEATTLE" "SAN BERNARDINO" ...
##  $ ProjectCountyName          : chr  "SUMTER" "CHARLESTON" "KING" "SAN BERNARDINO" ...
##  $ ProjectState               : chr  "SC" "SC" "WA" "CA" ...
##  $ ProjectZip                 : chr  "29150-9662" "29420-9000" "98112-2922" "92407-1740" ...
##  $ CD                         : chr  "SC-05" "SC-06" "WA-07" "CA-23" ...
##  $ JobsReported               : int  62 73 75 21 25 22 89 19 18 17 ...
##  $ NAICSCode                  : int  325510 561730 NA 236115 484210 326199 813110 423140 444220 424210 ...
##  $ Race                       : chr  "Unanswered" "White" "Unanswered" "American Indian or Alaska Native" ...
##  $ Ethnicity                  : chr  "Unknown/NotStated" "Unknown/NotStated" "Unknown/NotStated" "Not Hispanic or Latino" ...
##  $ UTILITIES_PROCEED          : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ PAYROLL_PROCEED            : num  769359 736928 691355 499871 367437 ...
##  $ MORTGAGE_INTEREST_PROCEED  : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ RENT_PROCEED               : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ REFINANCE_EIDL_PROCEED     : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ HEALTH_CARE_PROCEED        : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ DEBT_INTEREST_PROCEED      : num  NA NA NA NA NA NA NA NA NA NA ...
##  $ BusinessType               : chr  "Corporation" "Sole Proprietorship" "Non-Profit Organization" "Corporation" ...
##  $ OriginatingLenderLocationID: int  19248 19248 9551 9551 57328 57328 19248 57328 57328 57328 ...
##  $ OriginatingLender          : chr  "Synovus Bank" "Synovus Bank" "Bank of America, National Association" "Bank of America, National Association" ...
##  $ OriginatingLenderCity      : chr  "COLUMBUS" "COLUMBUS" "CHARLOTTE" "CHARLOTTE" ...
##  $ OriginatingLenderState     : chr  "GA" "GA" "NC" "NC" ...
##  $ Gender                     : chr  "Unanswered" "Male Owned" "Unanswered" "Male Owned" ...
##  $ Veteran                    : chr  "Unanswered" "Non-Veteran" "Unanswered" "Non-Veteran" ...
##  $ NonProfit                  : chr  "" "" "Y" "" ...
##  $ ForgivenessAmount          : num  773553 746336 696677 395264 370819 ...
##  $ ForgivenessDate            : chr  "11/20/2020" "08/12/2021" "02/10/2021" "09/10/2021" ...

3.2 Visualize

naniar::gg_miss_var(public_150k_plus_2019)

# naniar::gg_miss_upset(public_150k_plus_2019)

3.3 Summary Statistics

Make this professional looking.

stargazer(public_150k_plus_2019, 
          type = "text"
          )
## 
## ====================================================================================================
## Statistic                      N          Mean            St. Dev.           Min           Max      
## ----------------------------------------------------------------------------------------------------
## LoanNumber                  965,552 5,426,351,638.000 2,551,023,609.000 1,000,007,108 9,999,007,109 
## SBAOfficeCode               965,552      571.145           262.725           101          1,094     
## Term                        965,552      36.310            17.300             0            203      
## SBAGuarantyPercentage       965,552      100.000            0.000            100           100      
## InitialApprovalAmount       965,552    531,600.100       743,460.400        0.000     10,000,000.000
## CurrentApprovalAmount       965,552    529,962.400       737,069.600     150,000.000  10,000,000.000
## UndisbursedAmount           965,506       5.383           3,569.594         0.000     3,346,517.000 
## ServicingLenderLocationID   965,552    106,619.100       131,046.800         20          596,038    
## JobsReported                965,551      51.911            67.558             0            500      
## NAICSCode                   958,924    511,854.500       181,374.400       111,110       999,990    
## UTILITIES_PROCEED           338,349    14,936.930        85,013.160         0.000     10,000,000.000
## PAYROLL_PROCEED             963,725    514,265.600       713,324.000        0.000     10,000,000.000
## MORTGAGE_INTEREST_PROCEED   45,524     47,614.150        158,976.100        0.000     10,000,000.000
## RENT_PROCEED                99,224     56,125.270        111,237.300        0.000     5,518,278.000 
## REFINANCE_EIDL_PROCEED      22,848      6,878.027        62,064.420         0.000     2,951,590.000 
## HEALTH_CARE_PROCEED         57,426     46,867.770        102,927.000        0.000     3,880,000.000 
## DEBT_INTEREST_PROCEED       31,696     14,337.970        55,472.660         0.000     2,497,617.000 
## OriginatingLenderLocationID 965,552    106,167.200       132,804.200         20          533,479    
## ForgivenessAmount           939,037    528,117.600       731,600.500        0.010     10,276,578.000
## ----------------------------------------------------------------------------------------------------

4 EIN

Plot it with Tableau. library(esquisse) if you want within R.

4.1 Basic Exploration

  • Countries outside USA have state variable missing.
str(ein_data)
## 'data.frame':    1287563 obs. of  6 variables:
##  $ ID          : chr  "000004101" "000587764" "000635913" "000765634" ...
##  $ ORGANISATION: chr  "South Lafourche Quarterback Club" "Iglesia Bethesda Inc." "Ministerio Apostolico Jesucristo Es El Senor Inc." "Mercy Chapel International" ...
##  $ CITY        : chr  "Lockport" "Lowell" "Lawrence" "Mattapan" ...
##  $ STATE       : chr  "LA" "MA" "MA" "MA" ...
##  $ COUNTRY     : chr  "United States" "United States" "United States" "United States" ...
##  $ PF          : chr  "PF" "PC" "PC" "PC" ...
table(ein_data$COUNTRY)
## 
##            AFGHANISTAN                ALBANIA                ALGERIA 
##                     60                      1                      2 
##         AMERICAN SAMOA      ANTIGUA & BARBUDA              ARGENTINA 
##                      2                      2                      3 
##                ARMENIA              AUSTRALIA                AUSTRIA 
##                      2                     33                      3 
##                BAHRAIN             BANGLADESH               BARBADOS 
##                      1                      1                      1 
##                BELARUS                 BELIZE                BERMUDA 
##                      1                      2                      4 
##          BOUVET ISLAND                 BRAZIL   BRITISH COLUMBIA CAN 
##                      1                      1                      1 
##   BRITISH VIRGIN ISLAN BRITISH VIRGIN ISLANDS           BURKINA FASO 
##                      1                     39                      1 
##               CAMBODIA               CAMEROON                 CANADA 
##                      1                      4                    385 
##             CAPE VERDE                  CHINA               COLOMBIA 
##                      1                      3                      1 
##                COMOROS             COSTA RICA         CZECH REPUBLIC 
##                      1                      3                      1 
##       DEM REP OF CONGO                DENMARK     DOMINICAN REPUBLIC 
##                      2                      1                      1 
##            EAST AFRICA                ECUADOR                  EGYPT 
##                      1                      1                      1 
##                 FRANCE                GEORGIA                GERMANY 
##                     11                     13                      5 
##                 GREECE                   GUAM              GUATEMALA 
##                      4                      2                      2 
##                  HAITI              HONG KONG                  INDIA 
##                      4                      3                      4 
##              INDONESIA                   IRAN                IRELAND 
##                      1                      1                      4 
##                 ISRAEL                  ITALY                JAMAICA 
##                     29                      7                      1 
##                  JAPAN                 JERSEY                  KENYA 
##                     10                      1                     11 
##                   LAOS                LEBANON          LIECHTENSTEIN 
##                      2                      3                      1 
##              MAURITIUS                 MEXICO                MOLDOVA 
##                     10                     10                      1 
##               MONGOLIA                NAMIBIA            NETHERLANDS 
##                      1                      1                      7 
##                NIGERIA NORTHERN MARIANA ISLAN                 NORWAY 
##                      2                      3                      1 
##               PAKISTAN                   PERU            PHILIPPINES 
##                      1                      1                      6 
##               PORTUGAL            PUERTO RICO      REPUBLIC OF KOREA 
##                      2                      8                      3 
##                ROMANIA                SENEGAL           SIERRA LEONE 
##                      1                      3                      1 
##              SINGAPORE           SOUTH AFRICA                  SPAIN 
##                      2                      2                      1 
##               ST LUCIA                  SUDAN              SWAZILAND 
##                      1                      1                      1 
##                 SWEDEN            SWITZERLAND                 TAIWAN 
##                      5                      5                      2 
##               TANZANIA            THE BAHAMAS             THE GAMBIA 
##                      1                      1                      1 
##                   TOGO TURKS AND CAICOS ISLAN                 UGANDA 
##                      1                      1                      5 
##   UNITED ARAB EMIRATES         UNITED KINGDOM          United States 
##                      1                     35                1286740 
##                    USA                 VERNON         VIRGIN ISLANDS 
##                      1                      1                      2 
##         WESTERN SAHARA               ZIMBABWE 
##                      2                      1
# table(ein_data$STATE,    ein_data$COUNTRY)

4.2 Visualize

naniar::gg_miss_var(ein_data)

# naniar::gg_miss_upset(ein_data)
# ?Amelia::missmap
# Amelia::missmap(obj = ein_data)
# 
# VIM::matrixplot(ein_data)
# 
# DataExplorer::plot_missing(ein_data)

4.3 Summary Statistics

Make this professional looking. All variables are character, so no output for stargazer command on the dataframe.

stargazer(ein_data, 
          type = "text"
          )
## 
## =================================
## Statistic N Mean St. Dev. Min Max
## =================================

5 990 Extract

5.1 Basic Exploration

str(eoextract_990_2019)
## tibble [304,441 × 246] (S3: tbl_df/tbl/data.frame)
##  $ elf                  : chr [1:304441] "E" "E" "E" "E" ...
##  $ ein                  : num [1:304441] 1.42e+08 7.11e+08 2.32e+08 6.50e+08 5.91e+08 ...
##  $ tax_pd               : num [1:304441] 201806 201806 201808 201709 201709 ...
##  $ subseccd             : num [1:304441] 9 6 3 3 6 3 3 3 3 3 ...
##  $ s501c3or4947a1cd     : chr [1:304441] "N" "N" "Y" "Y" ...
##  $ schdbind             : chr [1:304441] "N" "N" "Y" "N" ...
##  $ politicalactvtscd    : chr [1:304441] "N" "N" "N" "N" ...
##  $ lbbyingactvtscd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ subjto6033cd         : chr [1:304441] "N" "Y" "N" "N" ...
##  $ dnradvisedfundscd    : chr [1:304441] "N" "N" "N" "N" ...
##  $ prptyintrcvdcd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ maintwrkofartcd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ crcounselingqstncd   : chr [1:304441] "N" "N" "N" "N" ...
##  $ hldassetsintermpermcd: chr [1:304441] "N" "N" "N" "N" ...
##  $ rptlndbldgeqptcd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptinvstothsecd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptinvstprgrelcd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptothasstcd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptothliabcd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ sepcnsldtfinstmtcd   : chr [1:304441] "N" "N" "N" "N" ...
##  $ sepindaudfinstmtcd   : chr [1:304441] "N" "Y" "N" "N" ...
##  $ inclinfinstmtcd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ operateschools170cd  : chr [1:304441] "N" "N" "N" "N" ...
##  $ frgnofficecd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ frgnrevexpnscd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ frgngrntscd          : chr [1:304441] "N" "N" "N" "N" ...
##  $ frgnaggragrntscd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptprofndrsngfeescd  : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptincfnndrsngcd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptincgamingcd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ operatehosptlcd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ hospaudfinstmtcd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptgrntstogovtcd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptgrntstoindvcd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ rptyestocompnstncd   : chr [1:304441] "N" "N" "N" "N" ...
##  $ txexmptbndcd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ invstproceedscd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ maintescrwaccntcd    : chr [1:304441] "N" "N" "N" "N" ...
##  $ actonbehalfcd        : chr [1:304441] "N" "N" "N" "N" ...
##  $ engageexcessbnftcd   : chr [1:304441] "N" "N" "N" "N" ...
##  $ awarexcessbnftcd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ loantofficercd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ grantoofficercd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ dirbusnreltdcd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ fmlybusnreltdcd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ servasofficercd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ recvnoncashcd        : chr [1:304441] "N" "N" "N" "N" ...
##  $ recvartcd            : chr [1:304441] "N" "N" "N" "N" ...
##  $ ceaseoperationscd    : chr [1:304441] "N" "N" "N" "N" ...
##  $ sellorexchcd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ ownsepentcd          : chr [1:304441] "N" "N" "N" "N" ...
##  $ reltdorgcd           : chr [1:304441] "Y" "N" "N" "N" ...
##  $ intincntrlcd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ orgtrnsfrcd          : chr [1:304441] "N" "N" "N" "N" ...
##  $ conduct5percentcd    : chr [1:304441] "N" "N" "N" "N" ...
##  $ compltschocd         : chr [1:304441] "Y" "Y" "Y" "Y" ...
##  $ f1096cnt             : num [1:304441] 0 0 5 0 0 9 1 9 3 0 ...
##  $ fw2gcnt              : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ wthldngrulescd       : chr [1:304441] "N" "N" "N" "Y" ...
##  $ noemplyeesw3cnt      : num [1:304441] 0 0 0 9 7 11 0 541 7 21 ...
##  $ filerqrdrtnscd       : chr [1:304441] "N" "N" "N" "Y" ...
##  $ unrelbusinccd        : chr [1:304441] "N" "N" "N" "N" ...
##  $ filedf990tcd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ frgnacctcd           : chr [1:304441] "N" "N" "N" "N" ...
##  $ prohibtdtxshltrcd    : chr [1:304441] "N" "N" "N" "N" ...
##  $ prtynotifyorgcd      : chr [1:304441] "N" "N" "N" "N" ...
##  $ filedf8886tcd        : chr [1:304441] "N" "N" "N" "N" ...
##  $ solicitcntrbcd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ exprstmntcd          : chr [1:304441] "N" "N" "N" "N" ...
##  $ providegoodscd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ notfydnrvalcd        : chr [1:304441] "N" "N" "N" "N" ...
##  $ filedf8282cd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ f8282cnt             : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ fndsrcvdcd           : chr [1:304441] "N" "N" "N" "N" ...
##  $ premiumspaidcd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ filedf8899cd         : chr [1:304441] "N" "N" "N" "N" ...
##  $ filedf1098ccd        : chr [1:304441] "N" "N" "N" "N" ...
##  $ excbushldngscd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ s4966distribcd       : chr [1:304441] "N" "N" "N" "N" ...
##  $ distribtodonorcd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ initiationfees       : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ grsrcptspublicuse    : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ grsincmembers        : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ grsincother          : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ filedlieuf1041cd     : chr [1:304441] "N" "N" "N" "N" ...
##  $ txexmptint           : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ qualhlthplncd        : chr [1:304441] "N" "N" "N" "N" ...
##  $ qualhlthreqmntn      : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ qualhlthonhnd        : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ rcvdpdtngcd          : chr [1:304441] "N" "N" "N" "N" ...
##  $ filedf720cd          : chr [1:304441] "N" "N" "N" "N" ...
##  $ totreprtabled        : num [1:304441] 0 0 0 0 0 ...
##  $ totcomprelatede      : num [1:304441] 9141 0 0 0 0 ...
##  $ totestcompf          : num [1:304441] 0 0 0 0 0 ...
##  $ noindiv100kcnt       : num [1:304441] 0 0 0 0 0 0 0 1 0 0 ...
##  $ nocontractor100kcnt  : num [1:304441] 0 0 0 0 0 0 0 0 0 0 ...
##  $ totcntrbgfts         : num [1:304441] 0 0 30073 3580 397416 ...
##  $ prgmservcode2acd     : chr [1:304441] NA NA NA "711210" ...
##  $ totrev2acola         : num [1:304441] 270495 189063 14864 100 95294 ...
##   [list output truncated]
str(eoextract_ez_2019)
## tibble [218,671 × 72] (S3: tbl_df/tbl/data.frame)
##  $ elf                  : chr [1:218671] "E" "E" "E" "E" ...
##  $ EIN                  : num [1:218671] 2.63e+08 5.10e+08 7.52e+08 4.65e+08 3.84e+08 ...
##  $ tax_pd               : num [1:218671] 201806 201806 201809 201712 201809 ...
##  $ subseccd             : num [1:218671] 3 8 3 3 3 3 3 5 3 19 ...
##  $ totcntrbs            : num [1:218671] 76123 700 57639 135219 141619 ...
##  $ prgmservrev          : num [1:218671] 31735 0 43684 0 0 ...
##  $ duesassesmnts        : num [1:218671] 0 49707 0 0 0 ...
##  $ othrinvstinc         : num [1:218671] 0 304 5 0 238 ...
##  $ grsamtsalesastothr   : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ basisalesexpnsothr   : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ gnsaleofastothr      : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ grsincgaming         : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ grsrevnuefndrsng     : num [1:218671] 0 7871 0 5656 0 ...
##  $ direxpns             : num [1:218671] 0 4882 0 653 0 ...
##  $ netincfndrsng        : num [1:218671] 0 2989 0 5003 0 ...
##  $ grsalesminusret      : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ costgoodsold         : num [1:218671] 0 0 0 0 0 0 0 0 0 1200 ...
##  $ grsprft              : num [1:218671] 0 0 0 0 0 0 0 0 0 -1200 ...
##  $ othrevnue            : num [1:218671] 0 1381 0 0 0 ...
##  $ totrevnue            : num [1:218671] 107858 55081 101328 140222 141857 ...
##  $ totexpns             : num [1:218671] 89433 53852 101287 85828 123059 ...
##  $ totexcessyr          : num [1:218671] 18425 1229 41 54394 18798 ...
##  $ othrchgsnetassetfnd  : num [1:218671] 0 0 0 0 -3252 ...
##  $ networthend          : num [1:218671] 28437 82735 20332 57297 147355 ...
##  $ totassetsend         : num [1:218671] 28437 82735 20332 106243 150892 ...
##  $ totliabend           : num [1:218671] 0 0 0 48946 3537 ...
##  $ totnetassetsend      : num [1:218671] 28437 82735 20332 57297 147355 ...
##  $ actvtynotprevrptcd   : chr [1:218671] "N" "N" "N" "N" ...
##  $ chngsinorgcd         : chr [1:218671] "N" "N" "N" "N" ...
##  $ unrelbusincd         : chr [1:218671] "N" "N" "N" "N" ...
##  $ filedf990tcd         : chr [1:218671] "N" "N" "N" "N" ...
##  $ contractioncd        : chr [1:218671] "N" "N" "N" "N" ...
##  $ politicalexpend      : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ filedf1120polcd      : chr [1:218671] "N" "N" "N" "N" ...
##  $ loanstoofficerscd    : chr [1:218671] "N" "N" "N" "N" ...
##  $ loanstoofficers      : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ initiationfee        : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ grspublicrcpts       : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ s4958excessbenefcd   : chr [1:218671] "N" "N" "N" "N" ...
##  $ prohibtdtxshltrcd    : chr [1:218671] "N" "N" "N" "N" ...
##  $ nonpfrea             : num [1:218671] 7 NA 7 7 9 9 9 NA 9 NA ...
##  $ totnooforgscnt       : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ totsupport           : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ gftgrntsrcvd170      : num [1:218671] 76123 0 57639 140875 0 ...
##  $ txrevnuelevied170    : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ srvcsval170          : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ pubsuppsubtot170     : num [1:218671] 76123 0 57639 140875 0 ...
##  $ exceeds2pct170       : num [1:218671] 0 0 0 9364 0 ...
##  $ pubsupplesspct170    : num [1:218671] 76123 0 57639 131511 0 ...
##  $ samepubsuppsubtot170 : num [1:218671] 76123 0 57639 140875 0 ...
##  $ grsinc170            : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ netincunreltd170     : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ othrinc170           : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ totsupp170           : num [1:218671] 76123 0 57639 140875 0 ...
##  $ grsrcptsrelated170   : num [1:218671] 31735 0 0 0 0 ...
##  $ totgftgrntrcvd509    : num [1:218671] 0e+00 0e+00 0e+00 0e+00 7e+05 ...
##  $ grsrcptsadmissn509   : num [1:218671] 0 0 0 0 0 ...
##  $ grsrcptsactivities509: num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ txrevnuelevied509    : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ srvcsval509          : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ pubsuppsubtot509     : num [1:218671] 0e+00 0e+00 0e+00 0e+00 7e+05 ...
##  $ rcvdfrmdisqualsub509 : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ exceeds1pct509       : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ subtotpub509         : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ pubsupplesub509      : num [1:218671] 0e+00 0e+00 0e+00 0e+00 7e+05 ...
##  $ samepubsuppsubtot509 : num [1:218671] 0e+00 0e+00 0e+00 0e+00 7e+05 ...
##  $ grsinc509            : num [1:218671] 0 0 0 0 1309 ...
##  $ unreltxincls511tx509 : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ subtotsuppinc509     : num [1:218671] 0 0 0 0 1309 ...
##  $ netincunrelatd509    : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ othrinc509           : num [1:218671] 0 0 0 0 0 0 0 0 0 0 ...
##  $ totsupp509           : num [1:218671] 0 0 0 0 701018 ...
naniar::gg_miss_var(eoextract_990_2019)

naniar::gg_miss_var(eoextract_ez_2019)

# naniar::gg_miss_var()

5.2 Summary Statistics

Make this professional looking.

stargazer(eoextract_990_2019, 
          type = "text"
          )
## 
## =================================
## Statistic N Mean St. Dev. Min Max
## =================================
stargazer(eoextract_ez_2019, 
          type = "text"
          )
## 
## =================================
## Statistic N Mean St. Dev. Min Max
## =================================
eoextract_990_2019 <- as.data.frame(eoextract_990_2019)
eoextract_ez_2019  <- as.data.frame(eoextract_ez_2019)

stargazer(eoextract_990_2019, 
          type = "text"
          )
## 
## ============================================================================================
## Statistic                N         Mean          St. Dev.          Min             Max      
## --------------------------------------------------------------------------------------------
## ein                   304,441 469,051,127.000 257,598,324.000   10,018,922     996,086,871  
## tax_pd                304,441   201,819.400       45.406         200,008         201,912    
## subseccd              304,441      4.080           2.762            2              29       
## f1096cnt              304,441     170.947        5,373.862          0            999,999    
## fw2gcnt               304,441      7.027         1,308.284          0            497,670    
## noemplyeesw3cnt       304,441     68.015          914.511           0            228,842    
## f8282cnt              304,441      0.013           1.702            0              789      
## initiationfees        304,441    3,987.610      119,518.700       -1,400       34,539,062   
## grsrcptspublicuse     304,441    2,912.265      65,675.290       -62,563       10,126,879   
## grsincmembers         304,441   200,754.400    6,819,695.000        0         1,052,813,352 
## grsincother           304,441    7,250.836      458,359.100    -45,244,700     130,264,340  
## txexmptint            304,441     0.0003           0.102            0              44       
## qualhlthreqmntn       304,441     310.001       151,530.900         0          83,366,896   
## qualhlthonhnd         304,441     491.504       283,086.100    -40,976,587     144,752,165  
## totreprtabled         304,441   186,563.700    1,029,158.000      -6,000       106,908,921  
## totcomprelatede       304,441   127,309.100     956,211.100      -28,525       96,052,991   
## totestcompf           304,441   37,676.360      270,271.300    -33,473,859     18,404,791   
## noindiv100kcnt        304,441      4.356          107.221           0            32,814     
## nocontractor100kcnt   304,441      5.425         1,868.610          0            999,999    
## totcntrbgfts          304,441  1,732,888.000  33,499,761.000     -114,181     9,265,119,609 
## totrev2acola          304,441  5,520,807.000  112,996,897.000  -32,556,679   40,474,009,543 
## totrev2bcola          304,441   815,470.400   33,347,467.000   -619,328,987  14,087,652,086 
## totrev2ccola          304,441   263,006.900   14,034,869.000   -339,037,393   5,304,481,846 
## totrev2dcola          304,441   116,719.600    5,806,273.000   -79,606,871    1,017,703,423 
## totrev2ecola          304,441   49,068.200     4,927,363.000   -116,998,311   2,086,714,309 
## totrev2fcola          304,441   49,721.160     7,187,967.000  -1,198,304,884  3,156,640,000 
## totprgmrevnue         304,441  6,815,297.000  150,901,464.000  -70,298,800   58,512,193,717 
## invstmntinc           304,441   190,762.300    6,142,786.000   -50,986,646    1,702,251,000 
## txexmptbndsproceeds   304,441     530.560       46,897.350      -4,848,748     10,577,000   
## royaltsinc            304,441   16,194.990     1,136,407.000     -78,343       442,119,958  
## grsrntsreal           304,441   34,460.210      897,078.900      -908,764      229,637,926  
## grsrntsprsnl          304,441     737.238       39,054.370        -2,550        8,901,492   
## rntlexpnsreal         304,441   17,308.730      514,035.000     -2,668,862     144,734,494  
## rntlexpnsprsnl        304,441     216.488       21,700.090          0           9,941,575   
## rntlincreal           304,441   17,131.200      556,905.800    -16,850,044     163,079,495  
## rntlincprsnl          304,441     522.627       33,926.500      -4,273,693      7,678,694   
## netrntlinc            304,441   17,672.230      558,031.100    -16,850,044     163,079,495  
## grsalesecur           304,441  3,967,154.000  343,748,858.000  -59,964,001   123,159,369,148
## grsalesothr           304,441   210,335.500   60,356,694.000    -6,795,721   32,937,778,000 
## cstbasisecur          304,441  3,750,693.000  337,951,423.000  -19,206,751   120,206,114,770
## cstbasisothr          304,441   176,456.200   58,347,389.000    -5,045,205   32,037,434,000 
## gnlsecur              304,441   216,461.100    9,571,484.000   -261,238,267   2,953,254,378 
## gnlsothr              304,441   33,879.290     5,883,255.000   -485,720,329   2,503,562,118 
## netgnls               304,441   250,342.800   11,300,350.000   -326,494,344   2,953,254,378 
## grsincfndrsng         304,441   26,673.430      221,624.700      -73,000       43,324,382   
## lessdirfndrsng        304,441   19,495.580      201,674.300      -641,707      43,324,382   
## netincfndrsng         304,441    7,177.856      108,334.000    -12,386,910     15,046,041   
## grsincgaming          304,441   20,655.710      327,236.000      -116,160      49,758,594   
## lessdirgaming         304,441   17,689.170      279,818.100      -362,960      31,983,604   
## netincgaming          304,441    2,966.549      86,872.200       -582,386      26,940,493   
## grsalesinvent         304,441   88,063.520     3,211,215.000     -135,770     1,186,823,337 
## lesscstofgoods        304,441   50,408.900     1,971,695.000     -424,306      702,313,503  
## netincsales           304,441   37,654.610     1,422,967.000   -40,428,171     484,509,834  
## miscrevtota           304,441   85,844.500     2,361,006.000   -93,523,149     567,878,832  
## miscrevtot11b         304,441   17,924.970      804,432.300    -97,232,975     285,591,609  
## miscrevtot11c         304,441    5,795.521      451,469.700    -192,215,843    47,677,459   
## miscrevtot11d         304,441   16,930.120     1,242,685.000   -29,571,629     495,542,067  
## miscrevtot11e         304,441   126,483.300    3,240,445.000   -172,459,203    569,093,745  
## totrevenue            304,441  9,197,969.000  163,816,402.000  -142,137,362  58,440,598,902 
## grntstogovt           304,441   343,100.100   13,570,026.000      -8,401      4,770,141,679 
## grnsttoindiv          304,441   222,921.600    5,696,084.000      -5,780       624,325,720  
## grntstofrgngovt       304,441   114,594.400   10,101,072.000        0         3,923,609,013 
## benifitsmembrs        304,441   681,560.300   29,109,067.000    -8,580,544    5,492,652,894 
## compnsatncurrofcr     304,441   137,019.200     851,140.600       -6,000       109,445,743  
## compnsatnandothr      304,441   17,691.460      860,546.000         0          380,184,496  
## othrsalwages          304,441  2,407,209.000  38,310,801.000     -273,270     6,612,941,799 
## pensionplancontrb     304,441   122,985.100    3,060,116.000   -25,718,000     946,979,240  
## othremplyeebenef      304,441   341,774.300    6,120,229.000   -21,467,190    1,279,431,012 
## payrolltx             304,441   173,818.500    2,486,357.000     -478,831      461,035,788  
## feesforsrvcmgmt       304,441   72,607.290     2,683,802.000    -4,818,271     889,710,557  
## legalfees             304,441   21,485.480      370,782.000     -5,544,253     91,957,603   
## accntingfees          304,441   15,088.360      236,785.000     -2,389,793     114,785,183  
## feesforsrvclobby      304,441    3,712.390      178,751.700      -68,784       77,780,053   
## profndraising         304,441    3,540.695      104,937.500      -35,000       17,235,812   
## feesforsrvcinvstmgmt  304,441   19,630.310      673,451.900      -66,413       156,852,540  
## feesforsrvcothr       304,441   557,500.300   13,674,577.000   -43,432,041    3,198,980,844 
## advrtpromo            304,441   47,293.600      799,676.100      -43,391       139,067,676  
## officexpns            304,441   189,088.800    5,557,443.000   -19,862,713    1,596,432,388 
## infotech              304,441   109,416.800    6,110,436.000    -4,618,398    2,962,492,041 
## royaltsexpns          304,441    2,933.905      207,647.300      -14,841       53,415,376   
## occupancy             304,441   226,512.200    2,838,893.000     -817,177      413,565,854  
## travel                304,441   59,169.980      940,807.900      -304,664      210,286,757  
## travelofpublicoffcl   304,441     166.444       16,780.070        -4,875        7,924,336   
## converconventmtng     304,441   41,362.650      542,035.900      -69,407       100,192,554  
## interestamt           304,441   114,271.300    3,293,329.000    -6,886,938    1,157,172,808 
## pymtoaffiliates       304,441   29,859.090     2,045,438.000   -80,841,308     842,003,285  
## deprcatndepletn       304,441   311,590.700    4,965,283.000     -156,789     1,004,764,292 
## insurance             304,441   62,055.220     1,140,066.000    -6,978,763     207,138,670  
## othrexpnsa            304,441  1,383,179.000  74,530,038.000   -361,015,133  37,509,179,064 
## othrexpnsb            304,441   371,968.000   14,161,598.000   -79,436,406    5,857,619,137 
## othrexpnsc            304,441   188,889.200   10,371,422.000   -295,035,255   4,732,693,782 
## othrexpnsd            304,441   82,896.700     3,366,731.000   -297,231,728   1,366,753,356 
## othrexpnse            304,441    9,725.683      673,774.700    -21,464,931     310,022,821  
## othrexpnsf            304,441   121,670.700    4,418,784.000   -125,411,621   1,280,339,023 
## totfuncexpns          304,441  8,608,289.000  155,959,787.000  -15,863,306   58,133,304,182 
## nonintcashend         304,441   549,920.500    6,489,969.000   -746,919,859   1,076,553,952 
## svngstempinvend       304,441  1,157,631.000  25,527,563.000   -99,130,010    9,433,517,363 
## pldgegrntrcvblend     304,441   321,218.200    9,326,320.000     -173,320     2,536,192,931 
## accntsrcvblend        304,441   806,531.900   17,811,959.000   -70,130,063    5,925,931,110 
## currfrmrcvblend       304,441    5,744.138      246,244.300      -57,335       38,779,640   
## rcvbldisqualend       304,441    3,312.447     1,011,294.000     -753,698      549,707,150  
## notesloansrcvblend    304,441  1,758,738.000  86,995,614.000   -10,290,780   25,871,010,087 
## invntriesalesend      304,441   91,848.810     2,161,473.000     -35,666       473,052,659  
## prepaidexpnsend       304,441   119,951.400    3,566,003.000   -66,817,978    1,194,046,525 
## lndbldgsequipend      304,441  4,461,184.000  68,317,706.000   -16,111,116   17,858,613,936 
## invstmntsend          304,441  4,719,191.000  132,948,259.000   -8,311,285   29,991,176,818 
## invstmntsothrend      304,441  3,155,197.000  137,213,420.000  -34,136,581   27,417,131,657 
## invstmntsprgmend      304,441   596,125.000   37,830,716.000   -97,517,983   14,746,666,554 
## intangibleassetsend   304,441   68,458.930     3,573,697.000    -2,300,758    1,080,940,520 
## othrassetsend         304,441  1,399,547.000  48,285,422.000   -56,471,471   16,613,780,014 
## totassetsend          304,441 19,214,571.000  339,848,094.000  -50,405,717   60,352,981,832 
## accntspayableend      304,441   989,187.400   21,882,820.000    -1,898,327    5,582,543,149 
## grntspayableend       304,441   60,523.560     5,738,681.000     -993,785     2,562,474,201 
## deferedrevnuend       304,441   322,871.400    9,068,730.000     -743,712     2,625,267,168 
## txexmptbndsend        304,441  1,468,666.000  39,652,208.000     -189,385     7,565,475,000 
## escrwaccntliabend     304,441   69,189.980     7,449,830.000     -109,572     2,362,042,286 
## paybletoffcrsend      304,441    9,871.603      636,417.600      -179,945      251,464,160  
## secrdmrtgsend         304,441  1,009,403.000  36,090,133.000    -1,889,495   15,858,200,062 
## unsecurednotesend     304,441   241,187.300   17,391,554.000    -1,222,565    5,689,742,234 
## othrliabend           304,441  3,976,396.000  129,552,895.000  -16,739,163   35,256,038,367 
## totliabend            304,441  8,147,483.000  169,337,584.000   -9,604,598   35,468,921,148 
## unrstrctnetasstsend   304,441  6,443,755.000  160,724,959.000 -5,035,263,268 56,628,591,335 
## temprstrctnetasstsend 304,441  1,508,316.000  81,029,439.000   -362,761,503  25,696,120,000 
## permrstrctnetasstsend 304,441  1,192,005.000  42,403,158.000   -41,391,591   12,387,613,285 
## capitalstktrstend     304,441   388,050.300   18,046,117.000   -906,774,501   4,325,784,332 
## paidinsurplusend      304,441   206,143.700   34,263,924.000   -601,188,056  15,251,182,880 
## retainedearnend       304,441  1,322,044.000  64,389,817.000  -4,218,815,300 26,533,916,868 
## totnetassetend        304,441 11,067,085.000  238,620,115.000 -5,034,822,702 56,628,591,335 
## totnetliabastend      304,441 19,213,898.000  339,848,121.000  -50,405,717   60,352,981,832 
## totnooforgscnt        304,441      3.807         1,608.781          0            841,239    
## totsupport            304,441   170,816.800   12,792,081.000    -5,062,756    3,589,257,517 
## gftgrntsrcvd170       304,441  5,557,900.000  115,743,677.000    -34,940     28,403,631,039 
## txrevnuelevied170     304,441   32,852.090     2,232,148.000     -34,702      1,001,307,516 
## srvcsval170           304,441   15,558.690      811,311.600      -17,842       283,052,796  
## pubsuppsubtot170      304,441  5,606,301.000  115,821,390.000    -34,940     28,403,631,039 
## exceeds2pct170        304,441   525,929.000   20,542,735.000     -90,327      6,689,595,671 
## pubsupplesspct170     304,441  5,080,276.000  108,832,843.000   -1,091,343   28,398,144,229 
## samepubsuppsubtot170  304,441  5,606,136.000  115,821,397.000    -34,940     28,403,631,039 
## grsinc170             304,441   316,348.500   13,555,744.000   -12,338,037    3,024,786,800 
## netincunreltd170      304,441    6,992.040      287,310.600     -6,568,996     67,709,520   
## othrinc170            304,441   106,438.600    7,081,777.000   -15,847,271    2,395,596,124 
## totsupp170            304,441  6,035,916.000  125,392,570.000   -3,182,104   30,399,728,474 
## grsrcptsrelated170    304,441  3,947,746.000  256,121,380.000 -1,956,907,941 114,555,540,076
## totgftgrntrcvd509     304,441   729,240.000   20,510,433.000     -248,713     7,759,831,000 
## grsrcptsadmissn509    304,441  4,994,014.000  487,571,714.000   -5,203,679   256,911,074,239
## grsrcptsactivities509 304,441   47,504.790     4,679,111.000   -19,413,853    2,461,090,614 
## txrevnuelevied509     304,441    9,821.879      802,195.600       -7,589       228,896,225  
## srvcsval509           304,441    2,522.861      147,285.600       -2,016       43,591,439   
## pubsuppsubtot509      304,441  5,783,103.000  488,200,523.000   -5,203,679   256,911,074,602
## rcvdfrmdisqualsub509  304,441   38,997.940     1,170,497.000        0          319,044,029  
## exceeds1pct509        304,441   101,208.500    6,818,645.000     -801,187     2,367,763,491 
## subtotpub509          304,441   140,283.000    6,950,521.000     -801,187     2,367,763,491 
## pubsupplesub509       304,441  5,642,617.000  487,982,510.000   -5,203,679   256,911,074,602
## samepubsuppsubtot509  304,441  5,783,027.000  488,200,524.000   -5,203,679   256,911,074,602
## grsinc509             304,441   65,827.130     2,161,052.000    -1,465,645     611,446,747  
## unreltxincls511tx509  304,441    1,197.152      106,426.800      -908,204      46,843,359   
## subtotsuppinc509      304,441   66,984.470     2,173,444.000    -1,465,645     611,446,747  
## netincunrelatd509     304,441    2,640.385      161,601.100     -7,343,355     75,232,835   
## othrinc509            304,441   36,523.980     2,225,672.000    -4,658,272     677,972,487  
## totsupp509            304,441  5,889,176.000  489,151,467.000   -5,203,679   257,205,447,242
## --------------------------------------------------------------------------------------------
stargazer(eoextract_ez_2019, 
          type = "text"
          )
## 
## =====================================================================================
## Statistic                N         Mean          St. Dev.         Min         Max    
## -------------------------------------------------------------------------------------
## EIN                   218,671 482,288,260.000 252,353,915.000 10,015,091  996,078,202
## tax_pd                218,671   201,814.500       78.205        200,611     201,912  
## subseccd              218,671      3.882           2.366           2          25     
## totcntrbs             218,671   28,749.450      41,456.460     -401,326     873,834  
## prgmservrev           218,671   15,538.000      33,125.240     -961,120     836,655  
## duesassesmnts         218,671    9,202.136      25,016.950      -9,559      626,865  
## othrinvstinc          218,671     678.655        4,365.343      -55,439     197,272  
## grsamtsalesastothr    218,671     783.911        8,504.244      -23,714    1,860,032 
## basisalesexpnsothr    218,671     626.938        8,062.349      -33,062    1,859,319 
## gnsaleofastothr       218,671     156.976        4,273.095     -603,025     250,000  
## grsincgaming          218,671     761.053        6,949.433      -24,038     351,016  
## grsrevnuefndrsng      218,671    9,073.627      22,381.740     -106,320     640,017  
## direxpns              218,671    5,203.924      14,668.120      -45,388     458,416  
## netincfndrsng         218,671    4,630.761      13,701.460     -441,941     601,926  
## grsalesminusret       218,671    2,527.251      13,327.500      -37,600     399,744  
## costgoodsold          218,671    1,452.362       7,989.859     -153,113     393,630  
## grsprft               218,671    1,074.894       7,564.207     -354,634     213,395  
## othrevnue             218,671    2,025.234      10,132.070      -63,794     379,769  
## totrevnue             218,671   62,056.140      50,328.370     -961,120     875,147  
## totexpns              218,671   59,159.210      64,963.660     -302,432   12,754,951 
## totexcessyr           218,671    2,896.749      48,201.730    -12,754,951   806,470  
## othrchgsnetassetfnd   218,671     -5.237        123,450.200   -15,279,420 46,576,714 
## networthend           218,671   70,933.260      137,531.900   -17,786,768  2,119,304 
## totassetsend          218,671   79,598.240      100,650.600   -3,618,951   2,119,304 
## totliabend            218,671    9,009.838      102,835.400    -539,876   17,849,415 
## totnetassetsend       218,671   70,588.420      137,109.900   -17,786,768  2,119,304 
## politicalexpend       218,671     18.149          993.633          0        196,636  
## loanstoofficers       218,671     563.443       12,240.880      -33,423    1,624,694 
## initiationfee         218,671     78.007         2,053.792         0        195,215  
## grspublicrcpts        218,671     48.595         1,838.355         0        198,194  
## nonpfrea              166,878      8.052           2.069           1          16     
## totnooforgscnt        218,671      0.032           0.311           0          34     
## totsupport            218,671     513.656       31,473.530      -16,244   12,754,951 
## gftgrntsrcvd170       218,671   63,404.350      420,469.500    -989,837   120,540,629
## txrevnuelevied170     218,671     846.370       34,155.640       -305     13,378,942 
## srvcsval170           218,670     727.587       45,668.500      -32,068   17,500,000 
## pubsuppsubtot170      218,671   64,978.300      429,510.100    -989,837   120,540,629
## exceeds2pct170        218,671    5,400.600      48,564.270      -90,924   10,193,320 
## pubsupplesspct170     218,671   59,347.370      420,487.700    -989,837   120,540,629
## samepubsuppsubtot170  218,671   64,834.720      429,497.000    -989,837   120,540,629
## grsinc170             218,671     873.263       19,475.870      -53,627    5,897,163 
## netincunreltd170      218,671     217.332        5,619.551      -28,318     826,032  
## othrinc170            218,671    4,825.193     1,379,672.000    -65,315   645,030,152
## totsupp170            218,671   70,750.510     1,446,353.000   -989,872   645,078,341
## grsrcptsrelated170    218,671    7,040.908      146,103.600     -63,530   42,888,900 
## totgftgrntrcvd509     218,671   67,207.620      419,288.200    -110,056   112,389,000
## grsrcptsadmissn509    218,671   51,860.310      456,107.500    -158,234   167,584,700
## grsrcptsactivities509 218,671    5,535.451      58,116.250      -87,637   17,949,609 
## txrevnuelevied509     218,671     484.432       79,741.370         0      36,980,362 
## srvcsval509           218,671     233.876        9,669.903      -28,170    1,686,177 
## pubsuppsubtot509      218,671   125,321.300     769,767.500    -110,056   279,973,700
## rcvdfrmdisqualsub509  218,670    1,765.478      49,245.210     -326,833   20,016,300 
## exceeds1pct509        218,671     917.788       18,058.450         0       3,523,010 
## subtotpub509          218,671    2,916.861      53,357.610      -33,917   20,016,300 
## pubsupplesub509       218,671   122,244.600     746,234.800    -357,382   274,853,000
## samepubsuppsubtot509  218,671   125,102.200     769,725.000    -110,056   279,973,700
## grsinc509             218,671     906.701       17,426.840      -13,757    5,836,401 
## unreltxincls511tx509  218,671     29.581         2,351.674     -168,149     598,508  
## subtotsuppinc509      218,671     946.348       17,919.630      -99,063    5,836,401 
## netincunrelatd509     218,671     230.978        7,030.830     -125,868    1,066,990 
## othrinc509            218,671    1,127.196      18,861.770    -1,159,670   3,630,935 
## totsupp509            218,671   127,406.800     774,336.700    -297,482   279,973,700
## -------------------------------------------------------------------------------------
plot(eoextract_990_2019$noemplyeesw3cnt, xlim = c(400,600))