names(NHANES)
 [1] "ID"               "SurveyYr"         "Gender"           "Age"              "AgeDecade"       
 [6] "AgeMonths"        "Race1"            "Race3"            "Education"        "MaritalStatus"   
[11] "HHIncome"         "HHIncomeMid"      "Poverty"          "HomeRooms"        "HomeOwn"         
[16] "Work"             "Weight"           "Length"           "HeadCirc"         "Height"          
[21] "BMI"              "BMICatUnder20yrs" "BMI_WHO"          "Pulse"            "BPSysAve"        
[26] "BPDiaAve"         "BPSys1"           "BPDia1"           "BPSys2"           "BPDia2"          
[31] "BPSys3"           "BPDia3"           "Testosterone"     "DirectChol"       "TotChol"         
[36] "UrineVol1"        "UrineFlow1"       "UrineVol2"        "UrineFlow2"       "Diabetes"        
[41] "DiabetesAge"      "HealthGen"        "DaysPhysHlthBad"  "DaysMentHlthBad"  "LittleInterest"  
[46] "Depressed"        "nPregnancies"     "nBabies"          "Age1stBaby"       "SleepHrsNight"   
[51] "SleepTrouble"     "PhysActive"       "PhysActiveDays"   "TVHrsDay"         "CompHrsDay"      
[56] "TVHrsDayChild"    "CompHrsDayChild"  "Alcohol12PlusYr"  "AlcoholDay"       "AlcoholYear"     
[61] "SmokeNow"         "Smoke100"         "Smoke100n"        "SmokeAge"         "Marijuana"       
[66] "AgeFirstMarij"    "RegularMarij"     "AgeRegMarij"      "HardDrugs"        "SexEver"         
[71] "SexAge"           "SexNumPartnLife"  "SexNumPartYear"   "SameSex"          "SexOrientation"  
[76] "PregnantNow"     
NHANES %>% 
  select(Age, Gender, Race1, Education, Work, Weight, Length, SmokeAge, SmokeNow) %>% 
  tbl_summary(by = Gender) %>% 
  add_n() %>% 
  add_p()
head_earn <- glm(HHIncome ~ Gender + Education +  Race1, data = NHANES )
‘-’ not meaningful for factors‘-’ not meaningful for factors‘-’ not meaningful for factorsError in glm.fit(x = c(1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1,  : 
  NA/NaN/Inf in 'y'
Characteristic OR1 95% CI1 p-value
Gender
female
male 2.13 1.46, 3.15 <0.001
Education
8th Grade
9 - 11th Grade 1.28 0.68, 2.34 0.4
High School 2.52 1.32, 4.76 0.005
Some College 3.30 1.73, 6.18 <0.001
College Grad 4.75 2.33, 9.75 <0.001
Race1
Black
Hispanic 1.59 0.77, 3.54 0.2
Mexican 1.11 0.60, 2.06 0.7
White 2.60 1.60, 4.13 <0.001
Other 3.30 1.35, 9.90 0.017

1 OR = Odds Ratio, CI = Confidence Interval

LS0tCnRpdGxlOiAiUiBOb3RlYm9vayIKb3V0cHV0OiBodG1sX25vdGVib29rCi0tLQoKYGBge3J9CnBhY21hbjo6cF9sb2FkKGd0c3VtbWFyeSwgCiAgICAgICAgICAgICAgIHRpZHl2ZXJzZSkKYGBgCgpgYGB7cn0KbGlicmFyeShOSEFORVMpCmRhdGEoTkhBTkVTKQpgYGAKCmBgYHtyfQpuYW1lcyhOSEFORVMpCmBgYAoKCmBgYHtyfQpOSEFORVMgJT4lIAogIHNlbGVjdChBZ2UsIEdlbmRlciwgUmFjZTEsIEVkdWNhdGlvbiwgV29yaywgV2VpZ2h0LCBMZW5ndGgsIFNtb2tlQWdlLCBTbW9rZU5vdykgJT4lIAogIHRibF9zdW1tYXJ5KGJ5ID0gR2VuZGVyKSAlPiUgCiAgYWRkX24oKSAlPiUgCiAgYWRkX3AoKQpgYGAKCgoKYGBge3J9CmhlYWRfZWFybiA8LSBnbG0oSEhJbmNvbWUgfiBHZW5kZXIgKyBFZHVjYXRpb24gKyAgUmFjZTEsIGRhdGEgPSBOSEFORVMsIGZhbWlseSA9ICJiaW5vbWlhbCIgKQpgYGAKCmBgYHtyfQpoZWFkX2Vhcm4gJT4lIAogIHRibF9yZWdyZXNzaW9uKGV4cG9uZW50aWF0ZSA9IFRSVUUpCmBgYAoK