Summary of NHDS data

Jack O. Wasey

2019-03-28

NHDS 2010 data

Information about the data themselves may be found on the US CDC web site.

Convenience functions

Convenience functions are provided to filter the data based on age categories and values. These functions drop extraneous fields which arise, e.g. the adult subset loses the newborn flag.

There is no newborn field in the adult subset, and age is renamed to age_years. nhds_adults() and nhds_adult() are synonymous.

Pediatric data retains age and age_unit, as age is specified in days, months or years. nhds_pediatric() and nhds_peds() are synonymous.

Infants’ ages may be in days or months.

Although an infant age 29-31 days is not a neonate by definition, all non-neonate infants have ages measured in months, and there are not patients with age recorded as 29-31 days. This may mean one month of age is recorded for these patients.

Neonates (but not newborns) sometimes have marital status recorded as being not single. This appears to be an artifact, but left as is. Newborn patients and the ‘newborn’ field are redundant when using nhds_neonatal_not_newborn(). nhds_neonatal() and nhds_neonate() are synonyms. Same for nhds_neonatal_not_newborn() and nhds_neonate_not_newborn().

All newborns have age of zero days recorded, so this field is dropped. nhds_newborn() and nhds_newborns() are synonymous.

Counts by age category

Summary

summary(nhds2010)
#>       id             newborn          age_unit           age       
#>  Length:151551      Mode :logical   years :135418   Min.   : 0.00  
#>  Class :character   FALSE:137459    months:  1313   1st Qu.:29.00  
#>  Mode  :character   TRUE :14092     days  : 14820   Median :54.00  
#>                                                     Mean   :49.89  
#>                                                     3rd Qu.:73.00  
#>                                                     Max.   :90.00  
#>                                                                    
#>      sex                        race          marital_status 
#>  male  :63603   white             :95444   married   :26024  
#>  female:87948   not_stated        :24543   single    :31794  
#>                 black             :20963   widowed   : 9020  
#>                 other             : 7929   divorced  : 4936  
#>                 asian             : 2090   separated :  729  
#>                 native_continental:  370   not_stated:79048  
#>                 (Other)           :  212                     
#>     dc_month           dc_status        care_days       dc_same_day    
#>  Min.   : 1.000   home      :116757   Min.   :  1.000   Mode :logical  
#>  1st Qu.: 3.000   AMA       :  1547   1st Qu.:  2.000   FALSE:149014   
#>  Median : 6.000   short_term:  3862   Median :  3.000   TRUE :2537     
#>  Mean   : 6.385   long_term : 15667   Mean   :  4.673                  
#>  3rd Qu.: 9.000   alive_NOS :  7028   3rd Qu.:  5.000                  
#>  Max.   :12.000   dead      :  2784   Max.   :497.000                  
#>                   not_stated:  3906                                    
#>        region          n_beds        hospital_ownership   weighting     
#>  northeast:28563   6-99   :24684   proprietary: 20257   Min.   :  18.0  
#>  midwest  :45631   100-199:29867   government : 20747   1st Qu.:  88.0  
#>  south    :61729   200-299:24121   non_profit :110547   Median : 125.0  
#>  west     :15628   300-499:45596                        Mean   : 256.8  
#>                    500+   :27283                        3rd Qu.: 235.0  
#>                                                         Max.   :3000.0  
#>                                                                         
#>      dx01               dx02               dx03          
#>  Length:151551      Length:151551      Length:151551     
#>  Class1:icd9cm      Class1:icd9cm      Class1:icd9cm     
#>  Class2:icd9        Class2:icd9        Class2:icd9       
#>  Class3:character   Class3:character   Class3:character  
#>  Mode  :character   Mode  :character   Mode  :character  
#>                                                          
#>                                                          
#>      dx04               dx05               dx06          
#>  Length:151551      Length:151551      Length:151551     
#>  Class1:icd9cm      Class1:icd9cm      Class1:icd9cm     
#>  Class2:icd9        Class2:icd9        Class2:icd9       
#>  Class3:character   Class3:character   Class3:character  
#>  Mode  :character   Mode  :character   Mode  :character  
#>                                                          
#>                                                          
#>      dx07               dx08               dx09          
#>  Length:151551      Length:151551      Length:151551     
#>  Class1:icd9cm      Class1:icd9cm      Class1:icd9cm     
#>  Class2:icd9        Class2:icd9        Class2:icd9       
#>  Class3:character   Class3:character   Class3:character  
#>  Mode  :character   Mode  :character   Mode  :character  
#>                                                          
#>                                                          
#>      dx10               dx11               dx12          
#>  Length:151551      Length:151551      Length:151551     
#>  Class1:icd9cm      Class1:icd9cm      Class1:icd9cm     
#>  Class2:icd9        Class2:icd9        Class2:icd9       
#>  Class3:character   Class3:character   Class3:character  
#>  Mode  :character   Mode  :character   Mode  :character  
#>                                                          
#>                                                          
#>      dx13               dx14               dx15          
#>  Length:151551      Length:151551      Length:151551     
#>  Class1:icd9cm      Class1:icd9cm      Class1:icd9cm     
#>  Class2:icd9        Class2:icd9        Class2:icd9       
#>  Class3:character   Class3:character   Class3:character  
#>  Mode  :character   Mode  :character   Mode  :character  
#>                                                          
#>                                                          
#>      pc01               pc02               pc03          
#>  Length:151551      Length:151551      Length:151551     
#>  Class1:icd9cm_pc   Class1:icd9cm_pc   Class1:icd9cm_pc  
#>  Class2:icd9        Class2:icd9        Class2:icd9       
#>  Class3:character   Class3:character   Class3:character  
#>  Mode  :character   Mode  :character   Mode  :character  
#>                                                          
#>                                                          
#>      pc04               pc05               pc06          
#>  Length:151551      Length:151551      Length:151551     
#>  Class1:icd9cm_pc   Class1:icd9cm_pc   Class1:icd9cm_pc  
#>  Class2:icd9        Class2:icd9        Class2:icd9       
#>  Class3:character   Class3:character   Class3:character  
#>  Mode  :character   Mode  :character   Mode  :character  
#>                                                          
#>                                                          
#>      pc07               pc08                           payor_primary  
#>  Length:151551      Length:151551      Medicare               :60674  
#>  Class1:icd9cm_pc   Class1:icd9cm_pc   Medicaid               :28195  
#>  Class2:icd9        Class2:icd9        HMO or PPO             :21293  
#>  Class3:character   Class3:character   other private insurance:13570  
#>  Mode  :character   Mode  :character   blue cross blue shield :13197  
#>                                        self pay               : 7335  
#>                                        (Other)                : 7287  
#>                 payor_secondary       DRG                  adm_type    
#>  other private insurance: 11319   Length:151551      emergency :73267  
#>  Medicaid               : 10386   Class :character   urgent    :23645  
#>  self pay               : 10112   Mode  :character   elective  :34700  
#>  blue cross blue shield :  7037                      newborn   :14092  
#>  HMO or PPO             :  4209                      trauma    :    0  
#>  (Other)                :  5197                      not_stated: 5847  
#>  NA's                   :103291                                        
#>                               adm_origin       dx_adm         
#>  Non-health care POA               :62565   Length:151551     
#>  Emergency room                    :48050   Class1:icd9cm     
#>  Newborn, born inside this hospital:11613   Class2:icd9       
#>  Clinic                            : 9143   Class3:character  
#>  Not available                     : 9089   Mode  :character  
#>  Transfer from a hospital          : 5905                     
#>  (Other)                           : 5186