Setup

Setup

knitr::opts_chunk$set(echo = TRUE)
knitr::opts_knit$set(root.dir = "C:/Users/lfult/Documents/Jose")

Load Libraries

options(scipen=20)

require(dplyr);require(doParallel);require(epitools);require(foreach)
## Loading required package: dplyr
## 
## Attaching package: 'dplyr'
## The following objects are masked from 'package:stats':
## 
##     filter, lag
## The following objects are masked from 'package:base':
## 
##     intersect, setdiff, setequal, union
## Loading required package: doParallel
## Warning: package 'doParallel' was built under R version 4.2.2
## Loading required package: foreach
## Warning: package 'foreach' was built under R version 4.2.2
## Loading required package: iterators
## Warning: package 'iterators' was built under R version 4.2.2
## Loading required package: parallel
## Loading required package: epitools
require(foreign);require(ggplot2);require(kableExtra);require(magrittr);require(MASS)
## Loading required package: foreign
## Loading required package: ggplot2
## Warning: package 'ggplot2' was built under R version 4.2.2
## Loading required package: kableExtra
## Warning: package 'kableExtra' was built under R version 4.2.2
## Warning in !is.null(rmarkdown::metadata$output) && rmarkdown::metadata$output
## %in% : 'length(x) = 2 > 1' in coercion to 'logical(1)'
## 
## Attaching package: 'kableExtra'
## The following object is masked from 'package:dplyr':
## 
##     group_rows
## Loading required package: magrittr
## Loading required package: MASS
## 
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
## 
##     select
require(plyr);require(psych);require(psychTools);require(SASxport)                            
## Loading required package: plyr
## ------------------------------------------------------------------------------
## You have loaded plyr after dplyr - this is likely to cause problems.
## If you need functions from both plyr and dplyr, please load plyr first, then dplyr:
## library(plyr); library(dplyr)
## ------------------------------------------------------------------------------
## 
## Attaching package: 'plyr'
## The following objects are masked from 'package:dplyr':
## 
##     arrange, count, desc, failwith, id, mutate, rename, summarise,
##     summarize
## Loading required package: psych
## Warning: package 'psych' was built under R version 4.2.2
## 
## Attaching package: 'psych'
## The following objects are masked from 'package:ggplot2':
## 
##     %+%, alpha
## Loading required package: psychTools
## Warning: package 'psychTools' was built under R version 4.2.2
## Loading required package: SASxport
## 
## Attaching package: 'SASxport'
## The following objects are masked from 'package:foreign':
## 
##     lookup.xport, read.xport
require(survey)
## Loading required package: survey
## Warning: package 'survey' was built under R version 4.2.2
## Loading required package: grid
## Loading required package: Matrix
## Loading required package: survival
## 
## Attaching package: 'survival'
## The following object is masked from 'package:epitools':
## 
##     ratetable
## 
## Attaching package: 'survey'
## The following object is masked from 'package:graphics':
## 
##     dotchart

Variable Selection

myvars=c("X.AGE.G", "X.IMPRACE","SEX" ,"MARITAL",   "INCOME2",   "EDUCA" ,"EMPLOY1", "VETERAN3" , "X.RFBMI5", "CVDCRHD4", "CVDSTRK3",  "CHCSCNCR" , "CHCOCNCR" , "CHCCOPD1" , "HAVARTH3" , "MENTHLTH", "CHCKIDNY" , "DIABETE3" , "X.STSTR" ,  "X.LLCPWT", "X.STATE", "Year");print(myvars)
##  [1] "X.AGE.G"   "X.IMPRACE" "SEX"       "MARITAL"   "INCOME2"   "EDUCA"    
##  [7] "EMPLOY1"   "VETERAN3"  "X.RFBMI5"  "CVDCRHD4"  "CVDSTRK3"  "CHCSCNCR" 
## [13] "CHCOCNCR"  "CHCCOPD1"  "HAVARTH3"  "MENTHLTH"  "CHCKIDNY"  "DIABETE3" 
## [19] "X.STSTR"   "X.LLCPWT"  "X.STATE"   "Year"

Primary Recoding

We make the following recodes.

.STATE: Not all states/territories are surveyed every year, creating gaps. We combine the FIPS codes for Census subregions to ensure that each region is represented every year.

.RFBMI5: Adults who have a body mass index greater than 25.00 Values: 1=No, 2=Yes, 9=Don’t Know/Refused/Missing Recode: 0=No, 1=Yes or Don’t Know/Refused/Missing (modal imputation, 8% missing)

.AGE.G: Six-level imputed age category Values: 1=18 to 24, 2=25 to 34, 3=35 to 44, 4=45 to 54, 5=55 to 64, 6=65 or older

.IMPRACE: Imputed race/ethnicity value Values: 1=White Non-Hispanic, 2=Black Non-Hispanic, 3=Asian Non-Hispanic, 4=American Indian/Alaskan Native Non-Hispanic, 5=Hispanic, 6=Other Race, Non-Hispanic Recode: 0=White, 1=Non-White

HISPANIC: Derived from IMPRACE Recode: 0=Non-Hispanic, 1=Hispanic

.SEX: Indicate sex of respondent Values: 1=Male, 2=Female, 9=Refused (.06%) Recode: 0=Not Known to Be Male, 1=Known to be Male (modal imputation)

.MARITAL: Are you..? Values: 1= Married, 2=Divorced, 3=Widowed, 4=Separated, 5=Never Married, 6=Unmarried Couple, 9=Refused, BLANK=Not asked or Missing Recode: 0=Did not Identify as Married, 1= Self-Identified as Married

.INCOME2: Is your annual household income from all sources: Values: 1=LT 10K, 2=LT 15K, 3=LT 20K, 4=LT 25K, 5=LT 35K, 6=LT 50K, 7=LT 75K, 8=GE 75K, 77=Don’t Know/Not Sure, 99= Refused, Not Asked or Missing Recode: 0=Not Identified as 75K or more, 1=Identified as 75K or more

EDUCA: What is the highest grade or year of school you completed? Values: 1=Never Attended School or Only Kindergarten, 2=Grades 1-8, 3=Grades 9-11, 4=Grade 12 or GED, 5=College 1-3 Years, 6=College 4 or more (graduate), 9=Refused, BLANK=Not Asked/Missing Recode: 0=Not Identified as College Grad, 1=College Graduate

EMPLOY1: Are you currently…? Values: 1=Employed for Wages, 2= Self-Employed, 3=Out of work >1 year, 4=Out of Work< 1 year, 5=A homemaker, 6= A student, 7=Retire, 8=Unable to Work, 9=Refused, BLANK=Not Asked/Missing Recode: 0=Did not Identify as Employed for Wages, 1=identified as Employed for Wages

VETERAN3: Have you ever served on active duty in the United States Armed Forces, either in the regular military or in a National Guard or military reserve unit? Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing Recode: 0=Not Yes, 1=Yes

The next several variables have the same recode. CVDCRHD4:(Ever told) you had angina or coronary heart disease? CVDSTRK3:(Ever told) you had a stroke. CHCSCNCR:(Ever told) you had skin cancer? CHCOCNCR: (Ever told) you had any other types of cancer? CHCCOPD: (Ever told) you have chronic obstructive pulmonary disease, C.O.P.D., emphysema or chronic bronchitis? HAVARTH:(Ever told) you have some form of arthritis, rheumatoid arthritis, gout, lupus, or fibromyalgia? (Arthritis diagnoses include: rheumatism, polymyalgia rheumatica; osteoarthritis (not osteporosis); tendonitis, bursitis, bunion, tennis elbow; carpal tunnel syndrome, tarsal tunnel syndrome; joint infection, etc.) CHCKIDNY*: (Ever told) you have kidney disease? Do NOT include kidney stones, bladder infection or incontinence.(Incontinence is not being able to control urine flow.) Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing Recode: 0=Not Yes, 1=Yes

DIABETE3: (Ever told) you have diabetes (If ´Yes´ and respondent is female, ask ´Was this only when you were pregnant?´ Values: 1=Yes, 2=Yes, Gestational Only, 3=No, 4=No, Pre-Diabetes, =Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing Recode: 0=Not Yes, 1=Yes

MENTHLTH: Now thinking about your mental health, which includes stress, depression, and problems with emotions, for how many days during the past 30 days was your mental health not good? Values: 1-30=Days, 88=None, 77=Don’Know/Not Sure, 99=Refused, BLANK=Not Asked/Missing Recode: 0=Not Positive Number between 1-30, 1=Positive Number between 1-30

#Pre-processing Function

myf=function(mydata, myvars){
  
  mydata=mydata[myvars] #reduce data set
  mydata$X.STATE[mydata$X.STATE %in% c(9, 23, 25, 33, 44, 50)==TRUE]="NEW.ENGLAND"
  mydata$X.STATE[mydata$X.STATE %in% c(17, 18, 26, 39, 55)==TRUE]="EAST.NORTH.CENTRAL"
  mydata$X.STATE[mydata$X.STATE %in% c(1, 21, 28, 47)==TRUE]="EAST.SOUTH.CENTRAL"
  mydata$X.STATE[mydata$X.STATE %in% c(34, 36, 42)==TRUE]="MIDDLE.ATLANTIC"
  mydata$X.STATE[mydata$X.STATE %in% c(8, 30, 32, 35, 49, 56, 4, 16)==TRUE]="MOUNTAIN"
  mydata$X.STATE[mydata$X.STATE %in% c(2, 6, 15, 41, 53)==TRUE]="PACIFIC"
  mydata$X.STATE[mydata$X.STATE %in% c(10, 11, 12, 13, 24, 37, 45, 51, 54)==TRUE]="SOUTH.ATLANTIC"
  mydata$X.STATE[mydata$X.STATE %in% c(19, 20, 27, 29, 31, 38, 46)==TRUE]="WEST.NORTH.CENTRAL"
  mydata$X.STATE[mydata$X.STATE %in% c(5, 22, 40, 48)==TRUE]="WEST.SOUTH.CENTRAL"
  mydata$X.STATE[mydata$X.STATE %in% c(60, 3, 81, 7, 64, 14, 66, 84, 86, 
                                       67, 89, 68, 71, 76, 69, 70, 95, 43, 72, 74, 52, 78, 79)==TRUE]="TERRITORIES"
  mydata$X.STATE=as.factor(mydata$X.STATE)
  
  mydata$X.RFBMI5[mydata$X.RFBMI5!=2]=0 #1=0, No = 0
  mydata$X.RFBMI5[mydata$X.RFBMI5==2]=1 #2=1, Yes = 1
  mydata$X.RFBMI5[is.na(mydata$X.RFBMI5)==TRUE]=0 #NA's
  
  mydata$HISPANIC=mydata$X.IMPRACE #Create Hispanic Variable
  mydata$HISPANIC[mydata$HISPANIC!=5]=0
  mydata$HISPANIC[mydata$HISPANIC==5]=1
  mydata$HISPANIC[is.na(mydata$HISPANIC)==TRUE]=0 #NA's
  
  mydata$X.IMPRACE[mydata$X.IMPRACE!=1]=0 #1=0, No = 0
  mydata$X.IMPRACE[is.na(mydata$X.IMPRACE)==TRUE]=0
  
  mydata$SEX[mydata$SEX!=1]=0 #Male=1, Others=0
  mydata$SEX[is.na(mydata$SEX)==TRUE]=0 
  
  mydata$MARITAL[mydata$MARITAL!=1]=0  #2 or higher = 0
  mydata$MARITAL[is.na(mydata$MARITAL)==TRUE]=0 
  
  mydata$INCOME2[mydata$INCOME2!=8]=0 #77 or 99 = 0
  mydata$INCOME2[mydata$INCOME2==8]=1 #GE 75K = 1
  mydata$INCOME2[is.na(mydata$INCOME2)==TRUE]=0 
  
  mydata$EDUCA[mydata$EDUCA!=6]=0 #Not College Grad
  mydata$EDUCA[mydata$EDUCA==6]=1 #College Grad
  mydata$EDUCA[is.na(mydata$EDUCA)==TRUE]=0 #
  
  mydata$EMPLOY1[mydata$EMPLOY1!=1]=0 #Not Employed for Wages
  mydata$EMPLOY1[is.na(mydata$EMPLOY1)==TRUE]=0 
  
  mydata$VETERAN3[mydata$VETERAN3!=1]=0 #Not Veteran
  mydata$VETERAN3[is.na(mydata$VETERAN3)==TRUE]=0 
  
  mydata$CVDCRHD4[mydata$CVDCRHD4!=1]=0 #Heart Disease
  mydata$CVDCRHD4[is.na(mydata$CVDCRHD4)==TRUE]=0 
  
  mydata$CVDSTRK3[mydata$CVDSTRK3!=1]=0 #Stroke
  mydata$CVDSTRK3[is.na(mydata$CVDSTRK3)==TRUE]=0 
  
  mydata$CHCSCNCR[mydata$CHCSCNCR!=1]=0 #Skin Cancer
  mydata$CHCSCNCR[is.na(mydata$CHCSCNCR)==TRUE]=0 
  
  mydata$CHCOCNCR[mydata$CHCOCNCR!=1]=0 #other Cancer
  mydata$CHCOCNCR[is.na(mydata$CHCOCNCR)==TRUE]=0 
  
  mydata$CHCCOPD1[mydata$CHCCOPD1!=1]=0 #COPD
  mydata$CHCCOPD1[is.na(mydata$CHCCOPD1)==TRUE]=0 
  
  mydata$HAVARTH3[mydata$HAVARTH3!=1]=0 #Arthritis
  mydata$HAVARTH3[is.na(mydata$HAVARTH3)==TRUE]=0 
  
  mydata$CHCKIDNY[mydata$CHCKIDNY!=1]=0 #Kidney
  mydata$CHCKIDNY[is.na(mydata$CHCKIDNY)==TRUE]=0 
  
  mydata$DIABETE3[mydata$DIABETE3!=1]=0 #Diabetes
  mydata$DIABETE3[is.na(mydata$DIABETE3)==TRUE]=0  
  
  mydata$MENTHLTH[mydata$MENTHLTH<=30]=1 #Mental Health
  mydata$MENTHLTH[mydata$MENTHLTH>30]=0
  mydata$MENTHLTH[is.na(mydata$MENTHLTH)==TRUE]=0
  mydata$MENTHLTH[is.na(mydata$MENTHLTH)==TRUE]=0  
  
  colnames(mydata)=c( "Age", "Caucasian", "Male" ,"Married", "Income.75K", 
    "College.Graduate" ,"Employed.for.Wages", "Veteran","Overweight.Obese", "Heart.Disease",
    "Stroke", "Skin.Cancer","Cancer" , "COPD" , "Arthritis", 
    "Depression", "Kidney.Disease" , "Diabetes","Stratum" ,  "Weights" , 
    "Region", "Year", "Hispanic")
  
  mydata=mydata[, c(1:2, 23, 3:22)] #Put Hispanic by Race
  for (i in 1:22){mydata[,i]=as.numeric(mydata[,i])}# for checking descriptives
  
  return(mydata)
}

print("Variable Recoding Function Loaded....")
## [1] "Variable Recoding Function Loaded...."

Prep and Print Functions

We use functions for unregistering clusters, citing, and printing.

options(survey.lonely.psu = "adjust")
myprint=function(x){x%>%kbl()%>%kable_classic(html_font = "Cambria")}
mycite=function(x){citation(x)}
unregister=function() {env <- foreach:::.foreachGlobals; rm(list=ls(name=env), pos=env)}
myprint;mycite;unregister
## function(x){x%>%kbl()%>%kable_classic(html_font = "Cambria")}
## function(x){citation(x)}
## function() {env <- foreach:::.foreachGlobals; rm(list=ls(name=env), pos=env)}

Read and Recode Data

Read Data with Cluster

Reading with \(foreach\) is significantly faster.

clust=makeCluster(14)
registerDoParallel(clust)
st=proc.time()
mytemp=foreach(i=2003:2021) %dopar% SASxport::read.xport(paste0("Y", i, ".xpt"))
proc.time()-st
##    user  system elapsed 
##    2.31    1.24   50.76
for (i in 1:19){mytemp[[i]]$Year=i+2002}
unregister()

Coding Documentation

The base year for variables was 2017. Post and prior years were recoded to match the variables in this year. Changes are noted on each tab.

Year 2021

CHCCOPD3=CHCOPD2 HAVARTH5=HAVARTH$:(Ever told) you have some form of arthritis, rheumatoid arthritis, gout, lupus, or fibromyalgia? (Arthritis diagnoses include: rheumatism, polymyalgia rheumatica; osteoarthritis (not osteporosis); tendonitis, bursitis, bunion, tennis elbow; carpal tunnel syndrome, tarsal tunnel syndrome; joint infection, etc.) INCOME3=INCOME2

Year 2020

No apparent changes.

Year 2019

In 2019, CHCKNDY was CHCKNDY2; SEX was SEXVAR, CHCOPD1 was CHCCOPD2, HAVARTH3 was HAVARTH4, and DIABETE3 was DIABETE4.

CHCKDNY2: Not including kidney stones, bladder infection or incontinence, were you ever told you have kidney disease? 1=Y, 2=N, 7=Don’t Know /Not Sure, 9=Refused, BLANK=Not Asked or Missing CHCKDNY1: (Ever told) you have kidney disease? Do NOT include kidney stones, bladder infection or incontinence. (Incontinence is not being able to control urine flow.) 1=Y, 2=N, 7=Don’t Know /Not Sure, 9=Refused, BLANK=Not Asked or Missing. These response options were identical.

SEXVAR: Sex of Respondent, 1=Male, 2=Female (No Refused Category) SEX: Indicate Sex of Respondent, 1=Male, 2=Female, 9=Refused Sex was modeled as either known to be male or not known to be male (meaning that the 7’s and 9’s were assumed female, the modal response value)

CHCOPD2:(Ever told) (you had) chronic obstructive pulmonary disease, C.O.P.D.,emphysema or chronic bronchitis? CHCOPD1:(Ever told) you have chronic obstructive pulmonary disease, C.O.P.D., emphysema or chronic bronchitis? Identical with same responses. This applied to HAVARTH3 and 4 as well as DIABETE3 and 4.

DIABETE4: (Ever told) (you had) diabetes? (If ´Yes´ and respondent is female, ask ´Was this only when you were pregnant?´. If Respondent says pre-diabetes or borderline diabetes, use response code 4.) DIABETE3: (Ever told) you have diabetes (If ´Yes´ and respondent is female, ask ´Was this only when you were pregnant?´. If Respondent says pre-diabetes or borderline diabetes, use response code 4.)

HAVARTH4:(Ever told) you have some form of arthritis, rheumatoid arthritis, gout, lupus, or fibromyalgia? (Arthritis diagnoses include: rheumatism, polymyalgia rheumatica; osteoarthritis (not osteporosis); tendonitis, bursitis, bunion, tennis elbow; carpal tunnel syndrome, tarsal tunnel syndrome; joint infection, etc.) HAVARTH3: (Ever told) you have some form of arthritis, rheumatoid arthritis, gout, lupus, or fibromyalgia? (Arthritis diagnoses include: rheumatism, polymyalgia rheumatica; osteoarthritis (not osteporosis); tendonitis, bursitis, bunion, tennis elbow; carpal tunnel syndrome, tarsal tunnel syndrome; joint infection, etc.)

Year 2018

In 2018, there were only two changes from the base year: CHCKDNY became CHCKDNY1, SEX became SEX1. CHCKDNY1: (Ever told) you have kidney disease? (Do NOT include kidney stones, bladder infection or incontinence.) CHCKDNY: (Ever told) you have kidney disease? Do NOT include kidney stones, bladder infection or incontinence.(Incontinence is not being able to control urine flow.) The response options were identical (1=Y, 2=N, 7=Don’t Know /Not Sure, 9=Refused, BLANK=Not Asked or Missing). These variables were treated as identical.

SEX1: What is your sex? or What was your sex at birth? Was it…, 1=Male, 2=Female, 7=Don’t Know/Not Sure, 9=Refused SEX: Indicate Sex of Respondent, 1=Male, 2=Female, 9=Refused Sex was modeled as either known to be male or not known to be male (meaning that the 7’s and 9’s were assumed female, the modal response value)

Year 2017

This year was the base year for all variables.

Year 2016

In 2016, the imputed race variables was named .RACE.

.RACE=Race/ethnicity categories Responses: 1. White Non-Hispanic, 2. Black Non-Hispanic, 3. American Indian / Native Alaskan Non-Hispanic, 4. Asian Non-Hispanic, 5. Native Hawaiian / PI, 6. Other Race Non-Hispanic, 7. Multiracial Non-Hispanic, 8. Hispanic, 9. Don’t Know / Not Sure / Refused

.IMPRACE=Imputed race/ethnicity value Responses: 1. White Non-Hispanic, 2. Black Non-Hispanic, 3. Asian Non-Hispanic, 4. American Indian / Native Alaskan Non-Hispanic, 5.Hispanic, 6. Other Race Non-Hispanic

To address this, we zero out 5’s and then assign 8’s to 5’s as we are only interested in White vs. Non-White, and Hispanics vs. Non-Hispanic.

Year 2015

In 2015, the imputed race variable was named .RACE.

Year 2014

In 2014, the imputed race variable was named .RACE.

Year 2013

In 2013, the imputed race variable was named .RACE.

Year 2012

In 2012, the imputed race variable was named .RACE2. The coding was similar but switched from RACE.

.RACE=Race/ethnicity categories Responses: 1. White Non-Hispanic, 2. Black Non-Hispanic, 3. Asian Only Non-Hispanic, 4. Native Hawaiian / PI, 5. American Indian or Alaskan Native Non-Hispanic, 6. Other Race Non-Hispanic, 7. Multiracial Hispanic, 8. Hispanic, 9. Don’t know/Not sure/Refused

Versus…

.IMPRACE=Imputed race/ethnicity value Responses: 1. White Non-Hispanic, 2. Black Non-Hispanic, 3. Asian Non-Hispanic, 4. American Indian / Native Alaskan Non-Hispanic, 5.Hispanic, 6. Other Race Non-Hispanic

Further the employment variable was EMPLOY rather than EMPLOY1.

.EMPLOY Values: 1. Employed for Wages, 2. Self-Employed, 3. Out of work for > 1 year, 4. Out of work < 1 year, 5. A Homemaker, 6. A Student, 7. Retired, 8. Unable to Work, 9. Refused, BLANK Not Asked or Missing

EMPLOY1: Are you currently…? Values: 1=Employed for Wages, 2= Self-Employed, 3=Out of work >1 year, 4=Out of Work< 1 year, 5=A homemaker, 6= A student, 7=Retire, 8=Unable to Work, 9=Refused, BLANK=Not Asked/Missing

Year 2011

In 2011, the imputed race variable was named .RACE2. The employment variable was EMPLOY rather than EMPLOY1 and measured as stated above. The COPD variable was CHCCOPD rather than CHCCOPD1 and measured identically.

Year 2010

In 2010, the race, employment and COPD changes were measured identically. Note: CDC recommends against combining (joint analysis) any years before 2010 due to the addition of cellular and raking methodology in 2011. However, these are the best estimates for the population, so treating the years independently when combined solves this issue.

On top of these changes, SEX was SEXG with 1=Male and 2=Female. The recoding in the base works. VETERAN3 was VETERAN2.

VETERAN2: Have you ever served on active duty in the United States Armed Forces, either in the regular military or in a National Guard or military reserve unit? Active duty does not include training for the Reserves or National Guard, but DOES include activation, for example, for the Persian Gulf War. Values: 1=Yes Now on Active Duty, 2=Yes On Active Duty In the Past But Not the Last 12 Months, 3=Yes, on active duty in the past, but not during the last 12 months, 4=No, training for Reserves or National Guard only, 5=No, never served in the military, 7=Don’t know/Not Sure, 9=Refused, BLANK=Not Asked / Missing

Versus

VETERAN3: Have you ever served on active duty in the United States Armed Forces, either in the regular military or in a National Guard or military reserve unit? Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing

To address this, we recoded 1-3 for VETERAN2 as 1 and all other values as 0.

HAVARTH2 preceeded HAVARTH3. The responses were identical

HAVARTH2:Have you ever been told by a doctor or other health professional that you have some form of arthritis, rheumatoid arthritis, gout, lupus, or fibromyalgia?(Arthritis diagnoses include: rheumatism, polymyalgia rheumatica; osteoarthritis (not osteporosis); tendonitis, bursitis, bunion, tennis elbow; carpal tunnel syndrome, tarsal tunnel syndrome; joint infection, etc.) Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing

HAVARTH3:(Ever told) you have some form of arthritis, rheumatoid arthritis, gout, lupus, or fibromyalgia? (Arthritis diagnoses include: rheumatism, polymyalgia rheumatica; osteoarthritis (not osteporosis); tendonitis, bursitis, bunion, tennis elbow; carpal tunnel syndrome, tarsal tunnel syndrome; joint infection, etc.) Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing

CHCSNCR,Skin Cancer, was derivable using CNCRTYPE, a follow-on to whether an individual was told they had cancer (CNCRHAVE). What type of cancer was it? 20 and 21 were “Melanoma” and “Other Skin Cancer.”

Similarly, Other Cancer (CHCOCNCR) were derivable from CNCRHAVE by eliminating 20 and 21 (skin cancers).

COPD was not available. Kidney Disease was not available.

DIABETE2 preceded DIABETE3. Responses were identical.

DIABETE2: Have you ever been told by a doctor that you have diabetes (If “Yes” and respondent is female, ask “Was this only when you were pregnant?”. Values: 1=Yes, 2=Yes, Gestational Only, 3=No, 4=No, Pre-Diabetes, =Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing Recode: 0=Not Yes, 1=Yes

DIABETE3: (Ever told) you have diabetes (If ´Yes´ and respondent is female, ask ´Was this only when you were pregnant?´ Values: 1=Yes, 2=Yes, Gestational Only, 3=No, 4=No, Pre-Diabetes, =Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing Recode: 0=Not Yes, 1=Yes

2010 did not use raking for weights, so they are less reliable in terms of estimating the population. Thus the weighting variables were different. The stratum weights remained the same, but the individual weight variable was different.

Year 2009

Year 2009 was identical to Year 2010 in terms of variables for this study.

Year 2008

In 2008, no questions existed about arthritis, skin cancer, other cancers, COPD, or kidney disease.
VETERAN was used instead of VETERAN2. The measurement and question was identical.

VETERAN: Have you ever served on active duty in the United States Armed Forces, either in the regular military or in a National Guard or military reserve unit? Active duty does not include training for the Reserves or National Guard, but DOES include activation, for example, for the Persian Gulf War. VETERAN2: Have you ever served on active duty in the United States Armed Forces, either in the regular military or in a National Guard or military reserve unit? Active duty does not include training for the Reserves or National Guard, but DOES include activation, for example, for the Persian Gulf War.

Both responses were the same.

Aside from these changes, there were no other differences from 2008.

Year 2007

In 2007, no questions existed about skin cancer, other cancers, COPD, or kidney disease.
VETERAN wasn’t used. Instead, VETERAN1 was. These responses were identical to VETERAN3. What was old was made new again.

VETERAN1: Have you ever served on active duty in the United States Armed Forces, either in the regular military or in a National Guard or military reserve unit? Active duty does not include training for the Reserves or National Guard, but DOES include activation, for example, for the Persian Gulf War. Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, Blank=Not Asked/Missing

Additionally, HAVARTH2 was in this set, but this measure was measured differently from HAVARTH3.

HAVARTH2: During the past 30 days, have you had symptoms of pain, aching, or stiffness in or around a joint? Values: 1=Yes, 2=No, 7=Don’t know/Not sure, 9=Refused HAVARTH3:(Ever told) you have some form of arthritis, rheumatoid arthritis, gout, lupus, or fibromyalgia? (Arthritis diagnoses include: rheumatism, polymyalgia rheumatica; osteoarthritis (not osteporosis); tendonitis, bursitis, bunion, tennis elbow; carpal tunnel syndrome, tarsal tunnel syndrome; joint infection, etc.) Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing

These variables were different and could not be compared alike.

Other variable naming changes existed, but there were no differences in the questions.

Year 2006

Another change..

CVDCRHD3/ CVDINFR3: Has a doctor, nurse, or other health professional ever told you that you had any of the following? For each, tell me “Yes”, “No”, or you’re “Not sure”: (Ever told) you had angina or coronary heart disease?

Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing

versus

CVDCRHD4: (Ever told) you had angina or coronary heart disease? Values: 1=Yes, 2=No, 7=Don’t Know/Not Sure, 9=Refused, BLANK=Not Asked/Missing

Year 2005

2005 looks like 2006 for the variables in question.

Year 2004

In 2004, no questions existed about skin cancer, other cancers, COPD, or kidney disease. A module about heart disease contained insufficient usable responses (256,507 blanks versus 303,822 total). Stroke was still present, but also largely unused (256,513 blanks).

Year 2003

In 2003, there was not a 6-group age variable but rather a 13 group. This was easy to collapse by recoding. No questions existed about skin cancer, other cancers, COPD, or kidney disease. DIABETES was the precursor to DIABETE2 and excluded only the pre-diabetes response. RFBMI3 was the precursor to RFBMI4 and was 1) Not at risk (_BMI3 < 2500) and 2) At Risk (2500 <= _BMI3 < 9999). This was identical to the results from RFBMI4 when recoded

Specific Year Recoding

#2021
mytemp[[19]]$CHCKIDNY=mytemp[[19]]$CHCKDNY2 #identical 
mytemp[[19]]$SEX=mytemp[[19]]$SEXVAR        #SEXVAR:  M/F, SEX:  M/F/R 
mytemp[[19]]$CHCCOPD1=mytemp[[19]]$CHCCOPD3 #identical
mytemp[[19]]$HAVARTH3=mytemp[[19]]$HAVARTH5 #identical
mytemp[[19]]$DIABETE3=mytemp[[19]]$DIABETE4 #identical
mytemp[[19]]$INCOME2=mytemp[[19]]$INCOME3  #more bins indicating $75K or above
mytemp[[19]]$INCOME2[mytemp[[19]]$INCOME2==9]=8
mytemp[[19]]$INCOME2[mytemp[[19]]$INCOME2==10]=8
mytemp[[19]]$INCOME2[mytemp[[19]]$INCOME2==11]=8

#2020
mytemp[[18]]$CHCKIDNY=mytemp[[18]]$CHCKDNY2 #identical 
mytemp[[18]]$SEX=mytemp[[18]]$SEXVAR        #SEXVAR:  M/F, SEX:  M/F/R 
mytemp[[18]]$CHCCOPD1=mytemp[[18]]$CHCCOPD2 #identical
mytemp[[18]]$HAVARTH3=mytemp[[18]]$HAVARTH4 #identical
mytemp[[18]]$DIABETE3=mytemp[[18]]$DIABETE4 #identical

#2019
mytemp[[17]]$CHCKIDNY=mytemp[[17]]$CHCKDNY2 #identical 
mytemp[[17]]$SEX=mytemp[[17]]$SEXVAR        #SEXVAR:  M/F, SEX:  M/F/R 
mytemp[[17]]$CHCCOPD1=mytemp[[17]]$CHCCOPD2 #identical
mytemp[[17]]$HAVARTH3=mytemp[[17]]$HAVARTH4 #identical
mytemp[[17]]$DIABETE3=mytemp[[17]]$DIABETE4 #identical

#2018
mytemp[[16]]$CHCKIDNY=mytemp[[16]]$CHCKDNY1 #identical
mytemp[[16]]$SEX=mytemp[[16]]$SEX1          #SEX1:  M/F/DK/R

#2017 is base year for coding, year 2017

#2016
mytemp[[14]]$X.IMPRACE=mytemp[[14]]$X.RACE  #different order and items
mytemp[[14]]$X.IMPRACE[mytemp[[14]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[14]]$X.IMPRACE[mytemp[[14]]$X.IMPRACE==8]=5 #assign 8 to all 5s

#2015
mytemp[[13]]$X.IMPRACE=mytemp[[13]]$X.RACE
mytemp[[13]]$X.IMPRACE[mytemp[[13]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[13]]$X.IMPRACE[mytemp[[13]]$X.IMPRACE==8]=5 #assign 8 to all 5s

#2014
mytemp[[12]]$X.IMPRACE=mytemp[[12]]$X.RACE
mytemp[[12]]$X.IMPRACE[mytemp[[12]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[12]]$X.IMPRACE[mytemp[[12]]$X.IMPRACE==8]=5 #assign 8 to all 5s

#2013
mytemp[[11]]$X.IMPRACE=mytemp[[11]]$X.RACE
mytemp[[11]]$X.IMPRACE[mytemp[[11]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[11]]$X.IMPRACE[mytemp[[11]]$X.IMPRACE==8]=5 #assign 8 to all 5s

#2012
mytemp[[10]]$X.IMPRACE=mytemp[[10]]$RACE2
mytemp[[10]]$X.IMPRACE[mytemp[[10]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[10]]$X.IMPRACE[mytemp[[10]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[10]]$EMPLOY1=mytemp[[10]]$EMPLOY

#2011
mytemp[[9]]$X.IMPRACE=mytemp[[9]]$RACE2
mytemp[[9]]$X.IMPRACE[mytemp[[9]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[9]]$X.IMPRACE[mytemp[[9]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[9]]$EMPLOY1=mytemp[[9]]$EMPLOY
mytemp[[9]]$CHCCOPD1=mytemp[[9]]$CHCCOPD

#2010
mytemp[[8]]$X.IMPRACE=mytemp[[8]]$RACE2
mytemp[[8]]$X.IMPRACE[mytemp[[8]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[8]]$X.IMPRACE[mytemp[[8]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[8]]$EMPLOY1=mytemp[[8]]$EMPLOY
mytemp[[8]]$X.RFBMI5=mytemp[[8]]$X.RFBMI4
mytemp[[8]]$SEX=mytemp[[8]]$X.SEXG.
mytemp[[8]]$VETERAN3=mytemp[[8]]$VETERAN2
mytemp[[8]]$VETERAN3[mytemp[[8]]$VETERAN3<=3]=1
mytemp[[8]]$VETERAN3[mytemp[[8]]$VETERAN3>=4]=0
mytemp[[8]]$HAVARTH3=rep('',nrow(mytemp[[8]]))
mytemp[[8]]$CHCSCNCR=rep('',nrow(mytemp[[8]]))
mytemp[[8]]$CHCOCNCR=rep('',nrow(mytemp[[8]]))
mytemp[[8]]$CHCCOPD1=rep('',nrow(mytemp[[8]]))
mytemp[[8]]$CHCCOPD1=rep('',nrow(mytemp[[8]]))
mytemp[[8]]$CHCKIDNY=rep('', nrow(mytemp[[8]]))
mytemp[[8]]$DIABETE3=mytemp[[8]]$DIABETE2
mytemp[[8]]$X.LLCPWT=mytemp[[8]]$X.FINALWT

#2009
mytemp[[7]]$X.IMPRACE=mytemp[[7]]$RACE2
mytemp[[7]]$X.IMPRACE[mytemp[[7]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[7]]$X.IMPRACE[mytemp[[7]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[7]]$EMPLOY1=mytemp[[7]]$EMPLOY
mytemp[[7]]$X.RFBMI5=mytemp[[7]]$X.RFBMI4
mytemp[[7]]$SEX=mytemp[[7]]$X.SEXG.
mytemp[[7]]$VETERAN3=mytemp[[7]]$VETERAN2
mytemp[[7]]$VETERAN3[mytemp[[7]]$VETERAN3<=3]=1
mytemp[[7]]$VETERAN3[mytemp[[7]]$VETERAN3>=4]=0
mytemp[[7]]$HAVARTH3=rep('',nrow(mytemp[[7]]))
mytemp[[7]]$CHCSCNCR=rep('',nrow(mytemp[[7]]))
mytemp[[7]]$CHCOCNCR=rep('',nrow(mytemp[[7]]))
mytemp[[7]]$CHCCOPD1=rep('',nrow(mytemp[[7]]))
mytemp[[7]]$CHCKIDNY=rep('', nrow(mytemp[[7]]))
mytemp[[7]]$DIABETE3=mytemp[[7]]$DIABETE2
mytemp[[7]]$X.LLCPWT=mytemp[[7]]$X.FINALWT

#2008
mytemp[[6]]$X.IMPRACE=mytemp[[6]]$RACE2
mytemp[[6]]$X.IMPRACE[mytemp[[6]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[6]]$X.IMPRACE[mytemp[[6]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[6]]$EMPLOY1=mytemp[[6]]$EMPLOY
mytemp[[6]]$X.RFBMI5=mytemp[[6]]$X.RFBMI4
mytemp[[6]]$SEX=mytemp[[6]]$X.SEXG.
mytemp[[6]]$VETERAN3=mytemp[[6]]$VETERAN1
mytemp[[6]]$HAVARTH3=rep('',nrow(mytemp[[6]]))
mytemp[[6]]$CHCSCNCR=rep('',nrow(mytemp[[6]]))
mytemp[[6]]$CHCOCNCR=rep('',nrow(mytemp[[6]]))
mytemp[[6]]$CHCCOPD1=rep('', nrow(mytemp[[6]]))
mytemp[[6]]$CHCKIDNY=rep('', nrow(mytemp[[6]]))
mytemp[[6]]$DIABETE3=mytemp[[6]]$DIABETE2
mytemp[[6]]$X.LLCPWT=mytemp[[6]]$X.FINALWT
mytemp[[6]]$X.STSTR=mytemp[[6]]$X.STSTR
mytemp[[6]]$X.AGE.G=mytemp[[6]]$X.AGE.G
mytemp[[6]]$X.STATE=mytemp[[6]]$X.STATE

#2007
mytemp[[5]]$X.IMPRACE=mytemp[[5]]$RACE2
mytemp[[5]]$X.IMPRACE[mytemp[[5]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[5]]$X.IMPRACE[mytemp[[5]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[5]]$EMPLOY1=mytemp[[5]]$EMPLOY
mytemp[[5]]$SEX=mytemp[[5]]$X.SEXG.
mytemp[[5]]$VETERAN3=mytemp[[5]]$VETERAN1
mytemp[[5]]$HAVARTH3=rep('',nrow(mytemp[[5]]))
mytemp[[5]]$CHCSCNCR=rep('',nrow(mytemp[[5]]))
mytemp[[5]]$CHCOCNCR=rep('',nrow(mytemp[[5]]))
mytemp[[5]]$CHCCOPD1=rep('', nrow(mytemp[[5]]))
mytemp[[5]]$CHCKIDNY=rep('', nrow(mytemp[[5]]))
mytemp[[5]]$DIABETE3=mytemp[[5]]$DIABETE2
mytemp[[5]]$X.LLCPWT=mytemp[[5]]$X.FINALWT
mytemp[[5]]$X.STSTR=mytemp[[5]]$X.STSTR
mytemp[[5]]$X.AGE.G=mytemp[[5]]$X.AGE.G
mytemp[[5]]$X.STATE=mytemp[[5]]$X.STATE
mytemp[[5]]$SEX=mytemp[[5]]$X.SEXG.
mytemp[[5]]$X.RFBMI5=mytemp[[5]]$X.RFBMI4

#2006
mytemp[[4]]$X.IMPRACE=mytemp[[4]]$RACE2
mytemp[[4]]$X.IMPRACE[mytemp[[4]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[4]]$X.IMPRACE[mytemp[[4]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[4]]$EMPLOY1=mytemp[[4]]$EMPLOY
mytemp[[4]]$X.RFBMI5=mytemp[[4]]$X.RFBMI4
mytemp[[4]]$SEX=mytemp[[4]]$X.SEXG.
mytemp[[4]]$VETERAN3=mytemp[[4]]$VETERAN
mytemp[[4]]$HAVARTH3=rep('',nrow(mytemp[[4]]))
mytemp[[4]]$CHCSCNCR=rep('',nrow(mytemp[[4]]))
mytemp[[4]]$CHCOCNCR=rep('',nrow(mytemp[[4]]))
mytemp[[4]]$CHCCOPD1=rep('', nrow(mytemp[[4]]))
mytemp[[4]]$CHCKIDNY=rep('', nrow(mytemp[[4]]))
mytemp[[4]]$CVDCRHD4=mytemp[[4]]$CVDCRHD3
mytemp[[4]]$DIABETE3=mytemp[[4]]$DIABETE2
mytemp[[4]]$X.LLCPWT=mytemp[[4]]$X.FINALWT
mytemp[[4]]$X.STSTR=mytemp[[4]]$X.STSTR
mytemp[[4]]$X.AGE.G=mytemp[[4]]$X.AGE.G
mytemp[[4]]$X.STATE=mytemp[[4]]$X.STATE
mytemp[[4]]$SEX=mytemp[[4]]$X.SEXG.
mytemp[[4]]$X.RFBMI5=mytemp[[4]]$X.RFBMI4

#2005
mytemp[[3]]$X.IMPRACE=mytemp[[3]]$RACE2
mytemp[[3]]$X.IMPRACE[mytemp[[3]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[3]]$X.IMPRACE[mytemp[[3]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[3]]$EMPLOY1=mytemp[[3]]$EMPLOY
mytemp[[3]]$X.RFBMI5=mytemp[[3]]$X.RFBMI4
mytemp[[3]]$SEX=mytemp[[3]]$X.SEXG.
mytemp[[3]]$VETERAN3=mytemp[[3]]$VETERAN
mytemp[[3]]$HAVARTH3=rep('',nrow(mytemp[[3]]))
mytemp[[3]]$CHCSCNCR=rep('',nrow(mytemp[[3]]))
mytemp[[3]]$CHCOCNCR=rep('',nrow(mytemp[[3]]))
mytemp[[3]]$CHCCOPD1=rep('', nrow(mytemp[[3]]))
mytemp[[3]]$CHCKIDNY=rep('', nrow(mytemp[[3]]))
mytemp[[3]]$CVDCRHD4=mytemp[[3]]$CVDCRHD3
mytemp[[3]]$DIABETE3=mytemp[[3]]$DIABETE2
mytemp[[3]]$X.LLCPWT=mytemp[[3]]$X.FINALWT
mytemp[[3]]$X.STSTR=mytemp[[3]]$X.STSTR
mytemp[[3]]$X.AGE.G=mytemp[[3]]$X.AGE.G
mytemp[[3]]$X.STATE=mytemp[[3]]$X.STATE
mytemp[[3]]$SEX=mytemp[[3]]$X.SEXG.
mytemp[[3]]$X.RFBMI5=mytemp[[3]]$X.RFBMI4

#2004
mytemp[[2]]$X.IMPRACE=mytemp[[2]]$RACE2
mytemp[[2]]$X.IMPRACE[mytemp[[2]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[2]]$X.IMPRACE[mytemp[[2]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[2]]$EMPLOY1=mytemp[[2]]$EMPLOY
mytemp[[2]]$X.RFBMI5=mytemp[[2]]$X.RFBMI4
mytemp[[2]]$VETERAN3=mytemp[[2]]$VETERAN
mytemp[[2]]$HAVARTH3=rep('',nrow(mytemp[[2]]))
mytemp[[2]]$CHCSCNCR=rep('',nrow(mytemp[[2]]))
mytemp[[2]]$CHCOCNCR=rep('',nrow(mytemp[[2]]))
mytemp[[2]]$CHCCOPD1=rep('', nrow(mytemp[[2]]))
mytemp[[2]]$CHCKIDNY=rep('', nrow(mytemp[[2]]))
mytemp[[2]]$CVDCRHD4=rep('', nrow(mytemp[[2]]))
mytemp[[2]]$CVDSTRK3=rep('', nrow(mytemp[[2]]))
mytemp[[2]]$DIABETE3=mytemp[[2]]$DIABETE2
mytemp[[2]]$X.LLCPWT=mytemp[[2]]$X.FINALWT
mytemp[[2]]$X.STSTR=mytemp[[2]]$X.STSTR
mytemp[[2]]$X.AGE.G=mytemp[[2]]$X.AGE.G
mytemp[[2]]$X.STATE=mytemp[[2]]$X.STATE
mytemp[[2]]$SEX=mytemp[[2]]$X.SEXG.
mytemp[[2]]$X.RFBMI5=mytemp[[2]]$X.RFBMI4

#2003
mytemp[[1]]$X.AGE.G=mytemp[[1]]$X.AGEG5YR
mytemp[[1]]$X.AGE.G[mytemp[[1]]$X.AGEG5YR>1 & mytemp[[1]]$X.AGEG5YR<=3]=2
mytemp[[1]]$X.AGE.G[mytemp[[1]]$X.AGEG5YR>3 & mytemp[[1]]$X.AGEG5YR<=5]=3
mytemp[[1]]$X.AGE.G[mytemp[[1]]$X.AGEG5YR>5 & mytemp[[1]]$X.AGEG5YR<=7]=4
mytemp[[1]]$X.AGE.G[mytemp[[1]]$X.AGEG5YR>7 & mytemp[[1]]$X.AGEG5YR<=9]=5
mytemp[[1]]$X.AGE.G[mytemp[[1]]$X.AGEG5YR>9]=6
mytemp[[1]]$X.IMPRACE=mytemp[[1]]$RACE2
mytemp[[1]]$X.IMPRACE[mytemp[[1]]$X.IMPRACE==5]=0 #zero out item 5
mytemp[[1]]$X.IMPRACE[mytemp[[1]]$X.IMPRACE==8]=5 #assign 8 to all 5s
mytemp[[1]]$EMPLOY1=mytemp[[1]]$EMPLOY
mytemp[[1]]$X.RFBMI5=mytemp[[1]]$X.RFBMI4
mytemp[[1]]$VETERAN3=mytemp[[1]]$VETERAN
mytemp[[1]]$HAVARTH3=rep('',nrow(mytemp[[1]]))
mytemp[[1]]$CHCSCNCR=rep('',nrow(mytemp[[1]]))
mytemp[[1]]$CHCOCNCR=rep('',nrow(mytemp[[1]]))
mytemp[[1]]$CHCCOPD1=rep('', nrow(mytemp[[1]]))
mytemp[[1]]$CHCKIDNY=rep('', nrow(mytemp[[1]]))
mytemp[[1]]$CVDCRHD4=rep('', nrow(mytemp[[1]]))
mytemp[[1]]$CVDSTRK3=rep('', nrow(mytemp[[1]]))
mytemp[[1]]$DIABETE3=mytemp[[1]]$DIABETES
mytemp[[1]]$X.LLCPWT=mytemp[[1]]$X.FINALWT
mytemp[[1]]$X.STSTR=mytemp[[1]]$X.STSTR
mytemp[[1]]$X.STATE=mytemp[[1]]$X.STATE
mytemp[[1]]$SEX=mytemp[[1]]$X.SEXG.
mytemp[[1]]$X.RFBMI5=mytemp[[1]]$X.RFBMI3

Final Modifications

Variable Selection

st=proc.time()
mytemp=lapply(mytemp,myf,myvars)
proc.time()-st
##    user  system elapsed 
##    2.04    0.74    7.08

Combine 2011-2021

Here, we build also a combined data set for 2011-2019. BRFSS data before 2011 should not be analyzed in combined datasets.

mynew=mytemp
mynew[[1]]=mynew[[2]]=mynew[[3]]=mynew[[4]]=mynew[[5]]=mynew[[6]]=mynew[[7]]=mynew[[8]]=NULL #delete years <2011
mynew=rbind(mynew[[1]], mynew[[2]], mynew[[3]],mynew[[4]],mynew[[5]], mynew[[6]],mynew[[7]],mynew[[8]],mynew[[9]],mynew[[10]],mynew[[11]])

myjoinedsurvey=survey::svydesign(id=~1,strata =~Stratum,weights =~Weights, check.strata=FALSE,data = mynew) #joined survey

Make Survey via Weighting

Build individual weighted surveys for each year… Again, do not combine years prior to 2011.

clust=makeCluster(14)
registerDoParallel(clust)
mysurveys=foreach(i=1:19)%do%survey::svydesign(id=~1,strata = ~Stratum,weights = ~Weights,data = mytemp[[i]])
rm(mytemp)
rm(mynew)
unregister()

Descriptive Statistics

Age-Adjusted Tables

Building Age-Adjusted Tables for all Variables over the Combined Surveys, 2011-2019

myf2=function(svy,dv){
  temp=survey::svytable(as.formula(paste0(dv, "~ Veteran+as.factor(Age)")), svy)
  temp1=survey::svytable(as.formula("~Veteran+as.factor(Age)"), svy)
  temp2=survey::svytable(as.formula(paste0(dv, "~as.factor(Age)")), svy)
  myvet=epitools::ageadjust.direct(count=temp[2,],pop=temp1[2,],stdpop=temp2,conf.level=.95)
  mynonvet=epitools::ageadjust.direct(count=temp[1,],pop=temp1[1,], stdpop=temp2,conf.level=.95)
  z=round(c(mynonvet[2],myvet[2]),2)
  names(z)=c(paste(dv, "Non-Vet"), paste(dv, "Vet"))
  return(z)
}

a1=c('Overweight.Obese', 'Heart.Disease','Stroke','Skin.Cancer','Cancer','COPD',
               'Arthritis','Depression','Kidney.Disease','Diabetes')

clust=makeCluster(10)
registerDoParallel(clust)

myt1=proc.time()
  p1=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[1])),myf2(myjoinedsurvey,a1[1]))
  p2=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[2])),myf2(myjoinedsurvey,a1[2]))
  p3=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[3])),myf2(myjoinedsurvey,a1[3]))
  p4=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[4])),myf2(myjoinedsurvey,a1[4]))
  p5=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[5])),myf2(myjoinedsurvey,a1[5]))
  p6=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[6])),myf2(myjoinedsurvey,a1[6]))
  p7=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[7])),myf2(myjoinedsurvey,a1[7]))
  p8=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[8])),myf2(myjoinedsurvey,a1[8]))
  p9=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[9])),myf2(myjoinedsurvey,a1[9]))
  p10=rbind(do.call(rbind,parLapply(clust,mysurveys,myf2,a1[10])),myf2(myjoinedsurvey,a1[10]))
proc.time()-myt1
##    user  system elapsed 
##   56.77    2.47  175.16
ptot=cbind(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
ptot=as.data.frame(ptot)
rownames(ptot)=c('Y2003','Y2004','Y2005','Y2006','Y2007','Y2008',
                 'Y2009','Y2010','Y2011','Y2012','Y2013','Y2014',
                 'Y2015','Y2016','Y2017','Y2018','Y2019','Y2020', 'Y2021', 'Y11-21')
myprint(ptot)
Overweight.Obese Non-Vet Overweight.Obese Vet Heart.Disease Non-Vet Heart.Disease Vet Stroke Non-Vet Stroke Vet Skin.Cancer Non-Vet Skin.Cancer Vet Cancer Non-Vet Cancer Vet COPD Non-Vet COPD Vet Arthritis Non-Vet Arthritis Vet Depression Non-Vet Depression Vet Kidney.Disease Non-Vet Kidney.Disease Vet Diabetes Non-Vet Diabetes Vet
Y2003 0.56 0.70 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 0.37 0.31 NaN NaN 0.11 0.13
Y2004 0.57 0.70 NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN NaN 0.37 0.31 NaN NaN 0.12 0.13
Y2005 0.58 0.70 0.08 0.13 0.05 0.06 NaN NaN NaN NaN NaN NaN NaN NaN 0.36 0.30 NaN NaN 0.13 0.14
Y2006 0.58 0.71 0.08 0.14 0.05 0.06 NaN NaN NaN NaN NaN NaN NaN NaN 0.37 0.30 NaN NaN 0.13 0.15
Y2007 0.59 0.72 0.08 0.13 0.05 0.06 NaN NaN NaN NaN NaN NaN NaN NaN 0.36 0.28 NaN NaN 0.14 0.16
Y2008 0.60 0.73 0.08 0.14 0.05 0.06 NaN NaN NaN NaN NaN NaN NaN NaN 0.36 0.30 NaN NaN 0.14 0.15
Y2009 0.60 0.73 0.07 0.13 0.05 0.06 NaN NaN NaN NaN NaN NaN NaN NaN 0.36 0.30 NaN NaN 0.14 0.16
Y2010 0.61 0.73 0.08 0.14 0.05 0.06 NaN NaN NaN NaN NaN NaN NaN NaN 0.36 0.30 NaN NaN 0.14 0.16
Y2011 0.60 0.73 0.08 0.13 0.05 0.06 0.11 0.16 0.11 0.13 0.08 0.09 0.37 0.36 0.37 0.30 0.03 0.03 0.15 0.18
Y2012 0.60 0.72 0.08 0.13 0.05 0.06 0.11 0.16 0.11 0.12 0.08 0.09 0.38 0.38 0.37 0.30 0.04 0.04 0.15 0.18
Y2013 0.60 0.72 0.08 0.13 0.05 0.06 0.11 0.16 0.11 0.13 0.08 0.10 0.38 0.37 0.35 0.29 0.04 0.04 0.16 0.18
Y2014 0.59 0.72 0.08 0.13 0.05 0.06 0.11 0.17 0.11 0.12 0.09 0.10 0.39 0.37 0.35 0.29 0.04 0.04 0.16 0.18
Y2015 0.59 0.71 0.07 0.12 0.05 0.06 0.12 0.17 0.12 0.13 0.08 0.10 0.37 0.37 0.36 0.30 0.04 0.04 0.16 0.19
Y2016 0.59 0.71 0.08 0.12 0.05 0.06 0.11 0.16 0.11 0.13 0.08 0.10 0.38 0.38 0.36 0.30 0.04 0.05 0.17 0.19
Y2017 0.59 0.71 0.07 0.12 0.05 0.06 0.12 0.17 0.12 0.14 0.09 0.11 0.37 0.37 0.38 0.31 0.04 0.05 0.17 0.19
Y2018 0.60 0.72 0.07 0.12 0.05 0.07 0.12 0.17 0.12 0.14 0.09 0.11 0.38 0.39 0.39 0.32 0.05 0.05 0.17 0.20
Y2019 0.60 0.71 0.07 0.11 0.05 0.07 0.12 0.18 0.12 0.14 0.09 0.11 0.37 0.37 0.41 0.35 0.05 0.05 0.17 0.19
Y2020 0.59 0.70 0.07 0.12 0.05 0.06 0.12 0.16 0.12 0.15 0.09 0.12 0.37 0.38 0.40 0.33 0.05 0.06 0.17 0.20
Y2021 0.59 0.71 0.07 0.11 0.05 0.06 0.12 0.18 0.12 0.14 0.09 0.11 0.37 0.39 0.44 0.38 0.05 0.05 0.17 0.19
Y11-21 0.60 0.71 0.07 0.12 0.05 0.06 0.12 0.17 0.12 0.13 0.09 0.10 0.37 0.37 0.38 0.31 0.04 0.05 0.16 0.19
rm(p1,p2,p3,p4,p5,p6,p7,p8,p9,p10)
unregister()

Vets vs. Non-Vets

Get the counts of veterans and non-veterans in the sample and estimated for the population.

clust=makeCluster(10)
registerDoParallel(clust)
st=proc.time()
res=foreach(i=1:19, .combine="rbind")%do%survey::svytable(~Veteran,mysurveys[[i]])
proc.time()-st
##    user  system elapsed 
##    2.13    0.04    4.54
unweighted=foreach(i=1:19, .combine="rbind")%do% table(mysurveys[[i]]$variables$Veteran)
res=cbind(res,unweighted)
colnames(res)=c("Non-Veteran Weighted", "Veteran Weighted", "Non-Veteran Samples", "Veteran Samples")
rownames(res)=seq(2003,2021)
res%>%kable(format.args = list(big.mark=",",scientific = FALSE))
Non-Veteran Weighted Veteran Weighted Non-Veteran Samples Veteran Samples
2003 190,348,049 30,003,072 228,159 36,525
2004 191,637,278 29,746,086 260,982 42,840
2005 194,578,583 29,532,523 305,107 51,005
2006 198,138,945 29,118,914 304,989 50,721
2007 202,498,717 27,673,461 370,990 59,922
2008 205,615,985 27,244,684 358,433 56,076
2009 208,756,506 26,249,349 374,909 57,698
2010 211,037,577 26,048,662 390,643 60,432
2011 212,198,501 25,812,791 441,873 64,594
2012 216,959,427 26,098,283 415,817 59,870
2013 219,968,409 26,056,006 430,268 61,505
2014 220,704,167 27,778,365 402,544 62,120
2015 224,174,518 27,172,620 383,614 57,842
2016 227,144,466 27,006,670 422,384 63,919
2017 229,254,924 26,398,281 392,148 57,868
2018 230,694,063 27,379,324 381,382 56,054
2019 226,740,688 25,689,603 365,038 53,230
2020 234,258,521 26,149,949 353,737 48,221
2021 222,097,968 23,943,672 386,175 52,518
rm(unweighted)
rm(res)
unregister()

Model Functions

Build Model Functions

Run some models and gather the odds ratios and confidence intervals.

options(digits=3)

clust=makeCluster(10)
registerDoParallel(clust)

#Model for each year

mymod=function(svy,dv){
  f=as.formula(paste0(dv,'~as.factor(Age)+Caucasian+Hispanic+Male+Married+Income.75K+
    College.Graduate+Employed.for.Wages+as.factor(Region)+Veteran'))
survey::svyglm(f,design=svy,family=quasibinomial)

}

#Model for all years

mymod1=function(svy,dv){
  f=as.formula(paste0(dv,'~as.factor(Age)+Caucasian+Hispanic+Male+Married+Income.75K+
    College.Graduate+Employed.for.Wages+as.factor(Region)+Veteran+as.factor(Year)'))
    survey::svyglm(f,design=svy,family=quasibinomial)

}

Build Forest Plot Coefficients

mytotmod=function(x){
  mydf1=cbind(exp(x[[1]]$coefficients), exp(confint(x[[1]])))
  mydf2=cbind(exp(x[[2]]$coefficients), exp(confint(x[[2]])))
  mydf3=cbind(exp(x[[3]]$coefficients), exp(confint(x[[3]])))
  mydf4=cbind(exp(x[[4]]$coefficients), exp(confint(x[[4]])))
  mydf5=cbind(exp(x[[5]]$coefficients), exp(confint(x[[5]])))
  mydf6=cbind(exp(x[[6]]$coefficients), exp(confint(x[[6]])))
  mydf7=cbind(exp(x[[7]]$coefficients), exp(confint(x[[7]])))
  mydf8=cbind(exp(x[[8]]$coefficients), exp(confint(x[[8]])))
  mydf9=cbind(exp(x[[9]]$coefficients), exp(confint(x[[9]])))
  mydf10=cbind(exp(x[[10]]$coefficients), exp(confint(x[[10]])))
  mydf11=cbind(exp(x[[11]]$coefficients), exp(confint(x[[11]])))
  mydf12=cbind(exp(x[[12]]$coefficients), exp(confint(x[[12]])))
  mydf13=cbind(exp(x[[13]]$coefficients), exp(confint(x[[13]])))
  mydf14=cbind(exp(x[[14]]$coefficients), exp(confint(x[[14]])))
  mydf15=cbind(exp(x[[15]]$coefficients), exp(confint(x[[15]])))
  mydf16=cbind(exp(x[[16]]$coefficients), exp(confint(x[[16]])))
  mydf17=cbind(exp(x[[17]]$coefficients), exp(confint(x[[17]])))
  mydf18=cbind(exp(x[[18]]$coefficients), exp(confint(x[[18]])))
  mydf19=cbind(exp(x[[19]]$coefficients), exp(confint(x[[19]])))
  groups=c(rep('Y03', 23), rep('Y04', 23), rep('Y05', 23),rep('Y06', 23),
         rep('Y07', 23), rep('Y08', 23), rep('Y09', 23),rep('Y10', 23),
         rep('Y11', 23), rep('Y12', 23), rep('Y13', 23),rep('Y14', 23),
         rep('Y15', 23), rep('Y16', 23), rep('Y17', 23),rep('Y18', 23),
         rep('Y19', 23), rep('Y20', 23), rep('Y21', 23))
  newterms=c('Intercept', 'AgeGp2', 'AgeGp3', 'AgeGp4', 'AgeGp5', 'AgeGp6',
           'Reg10', 'Reg2', 'Reg3', 'Reg4', 'Reg5', 'Reg6', 'Reg7', 'Reg8','Reg9',
           'White', 'CollegeGrad','Employed', 'Hispanic', '>$75K', 'Male', 'Married', 'Veteran')
  terms=rep(newterms, 19)
  mydftotal=data.frame(rbind(mydf1, mydf2, mydf3, mydf4, mydf5, mydf6, mydf7, mydf8, mydf9, 
                mydf10, mydf11, mydf12, mydf13, mydf14, mydf15, mydf16, mydf17, mydf18, mydf19))
  mydftotal$Groups=as.factor(groups)
  mydftotal$term=terms
  colnames(mydftotal)=c('Coefficient', 'Lower', 'Upper', 'Group', 'term')
  return(mydftotal)
  }

Build Forest Plot Function

myforest=function(x,tit){

ggplot(data=x,
    aes(x = term,y = Coefficient, ymin = 0, ymax = 2.0 ))+
    geom_point(aes(col=Group))+
    geom_hline(aes(fill=Group),yintercept =1, linetype=2)+
    xlab('')+ ylab("Odds Ratio (95% Confidence Interval)")+
    geom_errorbar(aes(ymin=Lower,
                      ymax=Upper,col=Group),width=0.5,cex=1)+ 
     ggtitle(tit)+
  facet_grid(~Group)+
        theme(plot.title=element_text(size=10,face="bold"),
        axis.text.y=element_text(size=10),
        axis.text.x=element_text(face="bold"),
        axis.title=element_text(size=12,face="bold"),
        strip.text.y = element_text(hjust=0,vjust = 1,angle=180,face="bold"))+
        guides(colour=FALSE)+
        coord_flip()
}

Build Column and Row Names Function

mycol=function(x) {
  colnames(x)=c('Y03','p','Y04','p','Y05','p','Y06','p','Y07','p','Y08','p','Y09','p','Y10','p',
                'Y11','p','Y12','p','Y13','p','Y14','p','Y15','p','Y16','p','Y17','p','Y18','p',
                'Y19','p','Y20','p','Y21','p')
  row.names(x)=c('Intercept', 'Age_Gp_2','Age_Gp_3', 'Age_Gp_4','Age_Gp_5','Age_Gp_6',
        'Caucasian', 'Hispanic', 'Male', 'Married', 'Income>=$75K', 'College Grad', 'Employed',
        'Region 2', 'Region 3','Region 4','Region 5','Region 6','Region 7','Region 8','Region 9','Region 10',
        'Veteran')
  return(x)}

Obesity Models

Raw Analysis

Obesity=lapply(mysurveys, mymod, a1[1])
OB1=cbind(exp(summary(Obesity[[1]])$coefficient[,1]),summary(Obesity[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Obesity[[i]])$coefficient[,1]),summary(Obesity[[i]])$coefficient[,4])
  OB1=cbind(OB1,tmp)
}

OB1=round(OB1,3)
OB1=mycol(OB1)
myprint(OB1)
Y03 p Y04 p Y05 p Y06 p Y07 p Y08 p Y09 p Y10 p Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.450 0.000 0.494 0.000 0.520 0.000 0.536 0.000 0.477 0.000 0.538 0.000 0.515 0.000 0.496 0.000 0.497 0.000 0.464 0.000 0.483 0.000 0.446 0.000 0.470 0.000 0.453 0.000 0.480 0.000 0.480 0.000 0.530 0.000 0.518 0.000 0.495 0.000
Age_Gp_2 2.074 0.000 1.973 0.000 1.840 0.000 1.946 0.000 2.145 0.000 1.998 0.000 2.227 0.000 2.344 0.000 2.016 0.000 2.127 0.000 2.043 0.000 1.995 0.000 2.024 0.000 1.935 0.000 1.969 0.000 1.970 0.000 1.802 0.000 1.854 0.000 1.859 0.000
Age_Gp_3 2.619 0.000 2.502 0.000 2.401 0.000 2.541 0.000 2.630 0.000 2.549 0.000 2.773 0.000 2.952 0.000 2.854 0.000 3.176 0.000 2.920 0.000 2.888 0.000 2.807 0.000 2.680 0.000 2.704 0.000 2.658 0.000 2.488 0.000 2.338 0.000 2.463 0.000
Age_Gp_4 3.081 0.000 2.855 0.000 2.794 0.000 2.870 0.000 3.032 0.000 2.819 0.000 3.187 0.000 3.391 0.000 3.348 0.000 3.578 0.000 3.430 0.000 3.402 0.000 3.310 0.000 3.156 0.000 3.216 0.000 3.074 0.000 2.972 0.000 2.697 0.000 2.791 0.000
Age_Gp_5 3.640 0.000 3.516 0.000 3.344 0.000 3.257 0.000 3.608 0.000 3.329 0.000 3.485 0.000 3.629 0.000 3.626 0.000 3.842 0.000 3.707 0.000 3.648 0.000 3.513 0.000 3.309 0.000 3.393 0.000 3.274 0.000 3.231 0.000 3.047 0.000 3.200 0.000
Age_Gp_6 2.454 0.000 2.490 0.000 2.445 0.000 2.591 0.000 2.687 0.000 2.442 0.000 2.724 0.000 2.961 0.000 3.060 0.000 3.265 0.000 3.197 0.000 3.250 0.000 3.167 0.000 2.962 0.000 3.017 0.000 2.991 0.000 2.832 0.000 2.651 0.000 2.670 0.000
Caucasian 0.883 0.000 0.811 0.000 0.851 0.000 0.850 0.000 0.921 0.000 0.879 0.000 0.910 0.000 0.876 0.000 0.883 0.000 0.908 0.000 0.922 0.000 0.998 0.897 0.954 0.008 1.025 0.155 0.996 0.834 0.990 0.611 0.993 0.713 1.004 0.867 0.999 0.958
Hispanic 1.030 0.455 0.967 0.375 0.994 0.867 0.892 0.003 1.116 0.003 1.076 0.038 1.137 0.000 1.115 0.001 1.132 0.000 1.120 0.000 1.105 0.000 1.200 0.000 1.205 0.000 1.195 0.000 1.135 0.000 1.152 0.000 1.135 0.000 1.223 0.000 1.298 0.000
Male 2.134 0.000 2.123 0.000 2.070 0.000 2.037 0.000 2.082 0.000 2.036 0.000 2.054 0.000 2.080 0.000 2.008 0.000 2.011 0.000 1.938 0.000 1.866 0.000 1.919 0.000 1.888 0.000 1.790 0.000 1.735 0.000 1.611 0.000 1.677 0.000 1.617 0.000
Married 1.125 0.000 1.135 0.000 1.146 0.000 1.145 0.000 1.091 0.000 1.093 0.000 1.102 0.000 1.088 0.000 1.088 0.000 1.102 0.000 1.104 0.000 1.081 0.000 1.035 0.015 1.062 0.000 1.075 0.000 1.045 0.004 1.053 0.001 1.047 0.009 1.020 0.208
Income>=$75K 0.940 0.003 0.917 0.000 0.921 0.000 0.935 0.001 0.937 0.000 0.938 0.000 0.907 0.000 0.935 0.000 0.932 0.000 0.941 0.000 0.952 0.003 1.028 0.096 1.120 0.000 1.102 0.000 1.102 0.000 1.150 0.000 1.207 0.000 1.228 0.000 1.309 0.000
College Grad 0.684 0.000 0.673 0.000 0.703 0.000 0.696 0.000 0.706 0.000 0.723 0.000 0.712 0.000 0.700 0.000 0.696 0.000 0.687 0.000 0.682 0.000 0.695 0.000 0.678 0.000 0.680 0.000 0.685 0.000 0.709 0.000 0.702 0.000 0.689 0.000 0.688 0.000
Employed 1.100 0.000 1.154 0.000 1.159 0.000 1.186 0.000 1.188 0.000 1.185 0.000 1.217 0.000 1.173 0.000 1.188 0.000 1.175 0.000 1.190 0.000 1.196 0.000 1.153 0.000 1.161 0.000 1.187 0.000 1.235 0.000 1.264 0.000 1.209 0.000 1.213 0.000
Region 2 1.041 0.172 1.127 0.000 1.077 0.010 1.074 0.028 1.140 0.000 1.126 0.000 1.062 0.032 1.070 0.018 1.049 0.112 1.044 0.083 1.085 0.002 1.055 0.045 1.080 0.004 1.142 0.000 1.062 0.018 1.090 0.001 1.089 0.001 1.165 0.000 1.268 0.000
Region 3 0.865 0.000 0.925 0.005 0.904 0.000 0.825 0.000 0.918 0.002 0.892 0.000 0.830 0.000 0.859 0.000 0.824 0.000 0.834 0.000 0.848 0.000 0.828 0.000 0.789 0.000 0.817 0.000 0.808 0.000 0.789 0.000 0.807 0.000 0.763 0.000 0.762 0.000
Region 4 0.787 0.000 0.828 0.000 0.805 0.000 0.798 0.000 0.836 0.000 0.805 0.000 0.794 0.000 0.817 0.000 0.773 0.000 0.767 0.000 0.786 0.000 0.799 0.000 0.768 0.000 0.780 0.000 0.801 0.000 0.822 0.000 0.792 0.000 0.795 0.000 0.871 0.000
Region 5 0.794 0.000 0.854 0.000 0.836 0.000 0.785 0.000 0.852 0.000 0.839 0.000 0.771 0.000 0.817 0.000 0.808 0.000 0.811 0.000 0.801 0.000 0.765 0.000 0.750 0.000 0.782 0.000 0.797 0.000 0.811 0.000 0.710 0.000 0.717 0.000 0.774 0.000
Region 6 0.915 0.008 0.930 0.037 0.893 0.000 0.810 0.000 0.821 0.000 0.858 0.000 0.774 0.000 0.806 0.000 0.784 0.000 0.788 0.000 0.729 0.000 0.699 0.000 0.718 0.000 0.759 0.000 0.718 0.000 0.761 0.000 0.740 0.000 0.773 0.000 0.805 0.000
Region 7 0.923 0.002 0.944 0.023 0.971 0.191 0.895 0.000 0.945 0.008 0.921 0.001 0.863 0.000 0.940 0.010 0.893 0.000 0.889 0.000 0.897 0.000 0.886 0.000 0.877 0.000 0.888 0.000 0.849 0.000 0.894 0.000 0.824 0.000 0.866 0.000 0.957 0.052
Region 8 1.044 0.424 0.988 0.822 0.954 0.400 1.038 0.476 0.918 0.103 0.906 0.053 0.865 0.005 0.920 0.144 0.922 0.056 0.915 0.036 0.957 0.323 0.957 0.316 0.945 0.198 0.991 0.841 1.053 0.290 1.153 0.002 1.133 0.004 1.041 0.515 1.253 0.000
Region 9 1.022 0.414 1.066 0.013 1.046 0.091 1.005 0.858 1.030 0.242 1.057 0.032 1.001 0.955 0.995 0.862 0.944 0.009 0.959 0.056 0.924 0.000 0.965 0.091 0.924 0.000 0.995 0.817 0.964 0.065 1.009 0.648 0.942 0.003 1.040 0.064 1.058 0.006
Region 10 0.960 0.160 1.012 0.694 0.979 0.477 0.921 0.031 0.947 0.029 0.988 0.685 0.962 0.220 0.969 0.309 0.959 0.147 0.939 0.029 0.954 0.105 0.979 0.442 0.953 0.102 1.022 0.502 1.018 0.596 1.014 0.685 0.957 0.151 0.959 0.214 0.953 0.129
Veteran 1.213 0.000 1.178 0.000 1.119 0.000 1.160 0.000 1.178 0.000 1.223 0.000 1.186 0.000 1.177 0.000 1.202 0.000 1.184 0.000 1.208 0.000 1.246 0.000 1.226 0.000 1.243 0.000 1.282 0.000 1.293 0.000 1.284 0.000 1.258 0.000 1.323 0.000

Forest Plot 1

ObesityF=mytotmod(Obesity)
subtotal=ObesityF[1:230,]
myforest(subtotal, 'Overweight/Obese')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.
## Warning: Using `size` aesthetic for lines was deprecated in ggplot2 3.4.0.
## ℹ Please use `linewidth` instead.
## Warning: The `<scale>` argument of `guides()` cannot be `FALSE`. Use "none" instead as
## of ggplot2 3.3.4.

Forest Plot 2

subtotal2=ObesityF[231:nrow(ObesityF),]
myforest(subtotal2, 'Overweight/Obese')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Heart Disease Models

Heart=lapply(mysurveys, mymod, a1[2])
## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge
HF1=cbind(exp(summary(Heart[[1]])$coefficient[,1]),summary(Heart[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Heart[[i]])$coefficient[,1]),summary(Heart[[i]])$coefficient[,4])
  HF1=cbind(HF1,tmp)
}
HF1=round(HF1,3)
HF1=mycol(HF1)
myprint(HF1[,-c(1:4)])
Y05 p Y06 p Y07 p Y08 p Y09 p Y10 p Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.006 0.000 0.005 0.000 0.004 0.000 0.004 0.000 0.003 0.000 0.002 0.000 0.003 0.000 0.003 0.000 0.003 0.000 0.005 0.000 0.003 0.000 0.003 0.000 0.004 0.000 0.004 0.000 0.004 0.000 0.003 0.000 0.003 0.000
Age_Gp_2 1.671 0.049 1.803 0.023 2.860 0.000 2.426 0.002 2.059 0.019 2.835 0.001 2.181 0.000 2.407 0.000 2.540 0.000 1.277 0.221 2.271 0.000 2.165 0.002 1.706 0.056 2.454 0.000 1.640 0.009 2.267 0.000 1.762 0.007
Age_Gp_3 2.880 0.000 3.611 0.000 4.810 0.000 4.977 0.000 4.698 0.000 6.527 0.000 4.992 0.000 5.636 0.000 4.555 0.000 2.917 0.000 5.360 0.000 5.845 0.000 4.257 0.000 4.712 0.000 3.911 0.000 4.549 0.000 3.314 0.000
Age_Gp_4 6.960 0.000 8.001 0.000 11.198 0.000 11.614 0.000 11.619 0.000 18.534 0.000 13.274 0.000 13.474 0.000 13.538 0.000 8.653 0.000 13.928 0.000 12.319 0.000 9.750 0.000 9.327 0.000 10.542 0.000 12.098 0.000 9.256 0.000
Age_Gp_5 13.714 0.000 16.916 0.000 21.206 0.000 23.802 0.000 23.740 0.000 40.789 0.000 26.200 0.000 27.464 0.000 23.469 0.000 14.990 0.000 26.501 0.000 23.806 0.000 18.725 0.000 17.931 0.000 18.754 0.000 20.958 0.000 16.595 0.000
Age_Gp_6 19.039 0.000 25.341 0.000 30.807 0.000 36.391 0.000 35.283 0.000 63.368 0.000 38.093 0.000 38.093 0.000 37.015 0.000 23.337 0.000 39.596 0.000 35.834 0.000 27.865 0.000 26.005 0.000 28.347 0.000 33.640 0.000 25.696 0.000
Caucasian 1.041 0.459 1.129 0.011 1.196 0.000 1.126 0.005 1.146 0.001 1.028 0.448 1.066 0.097 1.093 0.049 1.084 0.050 1.219 0.000 1.092 0.042 1.184 0.000 1.203 0.000 1.094 0.056 1.068 0.167 1.333 0.000 1.291 0.000
Hispanic 1.279 0.010 1.345 0.001 1.325 0.001 1.239 0.005 1.146 0.097 0.923 0.228 0.907 0.160 0.873 0.085 0.970 0.688 0.961 0.585 0.874 0.079 0.980 0.787 0.833 0.024 0.859 0.080 0.773 0.007 1.042 0.715 0.838 0.050
Male 1.562 0.000 1.601 0.000 1.650 0.000 1.655 0.000 1.630 0.000 1.739 0.000 1.616 0.000 1.776 0.000 1.673 0.000 1.641 0.000 1.662 0.000 1.646 0.000 1.703 0.000 1.697 0.000 1.701 0.000 1.713 0.000 1.685 0.000
Married 0.940 0.053 0.939 0.047 0.876 0.000 0.921 0.002 0.894 0.000 0.849 0.000 0.892 0.000 0.858 0.000 0.865 0.000 0.859 0.000 0.862 0.000 0.870 0.000 0.896 0.000 0.917 0.010 0.854 0.000 0.800 0.000 0.844 0.000
Income>=$75K 0.755 0.000 0.633 0.000 0.688 0.000 0.729 0.000 0.746 0.000 0.729 0.000 0.731 0.000 0.777 0.000 0.720 0.000 0.736 0.000 0.755 0.000 0.781 0.000 0.741 0.000 0.745 0.000 0.772 0.000 0.773 0.000 0.906 0.040
College Grad 0.750 0.000 0.778 0.000 0.772 0.000 0.818 0.000 0.754 0.000 0.796 0.000 0.753 0.000 0.699 0.000 0.768 0.000 0.778 0.000 0.756 0.000 0.748 0.000 0.712 0.000 0.708 0.000 0.784 0.000 0.792 0.000 0.718 0.000
Employed 0.572 0.000 0.564 0.000 0.465 0.000 0.527 0.000 0.516 0.000 0.513 0.000 0.485 0.000 0.459 0.000 0.474 0.000 0.490 0.000 0.452 0.000 0.462 0.000 0.473 0.000 0.483 0.000 0.472 0.000 0.509 0.000 0.483 0.000
Region 2 1.149 0.009 1.039 0.507 1.044 0.375 1.063 0.198 1.067 0.179 1.078 0.107 1.160 0.004 1.246 0.000 1.218 0.000 1.215 0.000 1.158 0.002 1.268 0.000 1.169 0.001 1.295 0.000 1.202 0.000 1.286 0.000 1.366 0.000
Region 3 1.065 0.220 0.963 0.508 0.995 0.921 0.938 0.172 0.998 0.968 1.000 0.998 1.035 0.476 0.976 0.662 1.001 0.976 1.067 0.182 0.975 0.625 0.959 0.384 0.990 0.840 0.995 0.928 0.964 0.529 1.055 0.338 1.042 0.421
Region 4 0.900 0.069 0.785 0.000 0.832 0.004 0.797 0.000 0.808 0.000 0.844 0.000 0.816 0.000 0.780 0.000 0.748 0.000 0.856 0.000 0.777 0.000 0.832 0.000 0.769 0.000 0.835 0.000 0.844 0.001 0.869 0.004 0.825 0.000
Region 5 1.006 0.913 0.846 0.001 0.910 0.023 0.825 0.000 0.940 0.155 0.960 0.332 0.894 0.010 0.861 0.000 0.841 0.000 0.971 0.518 0.932 0.149 0.872 0.004 0.867 0.012 0.891 0.019 0.891 0.019 0.920 0.131 0.939 0.253
Region 6 0.964 0.603 0.796 0.002 0.715 0.000 0.735 0.000 0.822 0.000 0.878 0.005 0.905 0.045 0.807 0.000 0.784 0.000 0.943 0.318 0.853 0.010 0.831 0.001 0.759 0.000 0.876 0.030 0.781 0.000 0.865 0.107 0.934 0.386
Region 7 1.124 0.013 0.987 0.779 0.968 0.395 0.932 0.107 1.022 0.634 1.015 0.696 1.045 0.280 1.042 0.336 0.969 0.431 1.076 0.072 1.001 0.988 0.966 0.362 0.967 0.423 1.118 0.012 1.007 0.871 1.095 0.057 1.072 0.150
Region 8 1.654 0.000 1.235 0.045 1.221 0.069 1.411 0.000 1.669 0.000 2.138 0.000 1.934 0.000 1.931 0.000 1.863 0.000 2.308 0.000 1.828 0.000 1.802 0.000 1.984 0.000 2.193 0.000 2.138 0.000 1.548 0.003 1.660 0.000
Region 9 0.967 0.505 0.881 0.019 0.863 0.002 0.886 0.008 0.890 0.010 0.930 0.101 0.910 0.028 0.881 0.003 0.886 0.007 0.934 0.105 0.930 0.084 0.874 0.001 0.904 0.011 0.986 0.748 0.913 0.028 1.017 0.680 0.961 0.359
Region 10 1.145 0.042 1.005 0.948 1.065 0.181 1.030 0.570 1.059 0.268 1.199 0.000 1.122 0.024 1.014 0.791 0.942 0.289 1.129 0.017 1.038 0.501 1.048 0.450 0.990 0.889 1.139 0.064 1.029 0.627 1.094 0.200 1.023 0.710
Veteran 1.397 0.000 1.326 0.000 1.333 0.000 1.431 0.000 1.448 0.000 1.316 0.000 1.363 0.000 1.279 0.000 1.361 0.000 1.377 0.000 1.286 0.000 1.329 0.000 1.341 0.000 1.377 0.000 1.340 0.000 1.390 0.000 1.229 0.000

Forest Plot 1

HeartF=mytotmod(Heart)
subtotal=HeartF[47:253,]
myforest(subtotal, 'Heart Disease')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=HeartF[254:nrow(HeartF),]
myforest(subtotal2, 'Heart Disease')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Stroke

Stroke=lapply(mysurveys, mymod, a1[3])
## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge
S1=cbind(exp(summary(Stroke[[1]])$coefficient[,1]),summary(Stroke[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Stroke[[i]])$coefficient[,1]),summary(Stroke[[i]])$coefficient[,4])
  S1=cbind(S1,tmp)
}
S1=round(S1,3)
S1=mycol(S1)
myprint(S1[,-c(1:4)])
Y05 p Y06 p Y07 p Y08 p Y09 p Y10 p Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.012 0.000 0.006 0.000 0.009 0.000 0.007 0.000 0.009 0.000 0.006 0.000 0.006 0.000 0.006 0.000 0.007 0.000 0.010 0.000 0.006 0.000 0.007 0.000 0.008 0.000 0.009 0.000 0.006 0.000 0.008 0.000 0.013 0.000
Age_Gp_2 1.443 0.218 2.612 0.001 2.397 0.001 2.710 0.000 1.188 0.486 2.550 0.000 3.130 0.000 3.334 0.000 2.763 0.000 2.320 0.000 3.129 0.000 3.203 0.000 2.338 0.001 2.320 0.000 3.470 0.000 2.459 0.000 1.313 0.185
Age_Gp_3 2.920 0.000 4.887 0.000 3.675 0.000 5.081 0.000 3.288 0.000 5.775 0.000 6.007 0.000 6.670 0.000 5.816 0.000 4.401 0.000 7.182 0.000 6.510 0.000 4.975 0.000 5.339 0.000 6.805 0.000 5.008 0.000 3.481 0.000
Age_Gp_4 4.980 0.000 9.425 0.000 7.980 0.000 10.077 0.000 7.281 0.000 11.346 0.000 12.124 0.000 11.493 0.000 10.975 0.000 9.129 0.000 13.744 0.000 11.522 0.000 9.089 0.000 10.451 0.000 14.730 0.000 9.482 0.000 6.562 0.000
Age_Gp_5 8.903 0.000 15.257 0.000 12.587 0.000 15.708 0.000 11.201 0.000 15.609 0.000 17.824 0.000 17.363 0.000 15.838 0.000 12.071 0.000 20.080 0.000 16.010 0.000 13.107 0.000 14.487 0.000 21.132 0.000 14.348 0.000 9.834 0.000
Age_Gp_6 13.661 0.000 21.576 0.000 18.340 0.000 23.838 0.000 16.729 0.000 24.451 0.000 24.326 0.000 22.580 0.000 20.751 0.000 15.701 0.000 24.455 0.000 19.177 0.000 15.655 0.000 17.441 0.000 24.709 0.000 18.757 0.000 11.900 0.000
Caucasian 0.680 0.000 0.770 0.000 0.737 0.000 0.708 0.000 0.748 0.000 0.731 0.000 0.732 0.000 0.721 0.000 0.802 0.000 0.717 0.000 0.788 0.000 0.842 0.000 0.818 0.000 0.726 0.000 0.731 0.000 0.777 0.000 0.775 0.000
Hispanic 0.730 0.019 0.778 0.027 0.810 0.045 0.733 0.001 0.766 0.002 0.673 0.000 0.720 0.000 0.623 0.000 0.675 0.000 0.622 0.000 0.627 0.000 0.666 0.000 0.603 0.000 0.703 0.000 0.590 0.000 0.766 0.017 0.745 0.001
Male 1.096 0.109 1.203 0.001 1.141 0.003 1.049 0.253 0.999 0.985 1.062 0.113 0.999 0.973 1.125 0.005 1.076 0.041 1.081 0.034 1.087 0.025 1.110 0.006 1.122 0.005 1.130 0.003 1.174 0.000 1.054 0.283 1.074 0.085
Married 0.722 0.000 0.700 0.000 0.696 0.000 0.677 0.000 0.698 0.000 0.742 0.000 0.726 0.000 0.705 0.000 0.712 0.000 0.694 0.000 0.698 0.000 0.713 0.000 0.725 0.000 0.772 0.000 0.687 0.000 0.697 0.000 0.693 0.000
Income>=$75K 0.662 0.000 0.470 0.000 0.495 0.000 0.553 0.000 0.565 0.000 0.578 0.000 0.623 0.000 0.667 0.000 0.531 0.000 0.545 0.000 0.549 0.000 0.604 0.000 0.579 0.000 0.550 0.000 0.564 0.000 0.664 0.000 0.636 0.000
College Grad 0.654 0.000 0.686 0.000 0.696 0.000 0.666 0.000 0.727 0.000 0.644 0.000 0.651 0.000 0.616 0.000 0.664 0.000 0.695 0.000 0.642 0.000 0.604 0.000 0.618 0.000 0.640 0.000 0.698 0.000 0.625 0.000 0.660 0.000
Employed 0.435 0.000 0.356 0.000 0.358 0.000 0.363 0.000 0.365 0.000 0.351 0.000 0.352 0.000 0.325 0.000 0.372 0.000 0.343 0.000 0.336 0.000 0.356 0.000 0.373 0.000 0.349 0.000 0.370 0.000 0.383 0.000 0.355 0.000
Region 2 1.210 0.007 1.345 0.000 1.155 0.017 1.219 0.000 1.192 0.003 1.239 0.000 1.207 0.003 1.294 0.000 1.239 0.000 1.281 0.000 1.280 0.000 1.304 0.000 1.316 0.000 1.333 0.000 1.323 0.000 1.372 0.000 1.216 0.004
Region 3 0.863 0.075 0.872 0.070 0.869 0.054 0.868 0.025 0.864 0.033 0.934 0.244 0.775 0.000 0.870 0.060 0.861 0.016 0.866 0.018 0.893 0.076 0.887 0.055 0.917 0.148 0.884 0.048 0.961 0.532 0.871 0.051 0.807 0.001
Region 4 0.842 0.031 1.001 0.988 0.904 0.135 0.887 0.042 0.909 0.099 1.003 0.956 0.901 0.107 0.914 0.111 0.823 0.003 0.889 0.022 0.879 0.018 0.925 0.147 0.867 0.003 0.883 0.027 0.927 0.183 0.881 0.032 0.784 0.000
Region 5 0.862 0.051 0.836 0.006 0.786 0.000 0.817 0.000 0.792 0.000 0.823 0.001 0.797 0.000 0.793 0.000 0.812 0.000 0.878 0.031 0.850 0.006 0.827 0.002 0.950 0.462 0.807 0.000 0.801 0.000 0.780 0.000 0.780 0.000
Region 6 0.964 0.723 1.064 0.484 0.873 0.092 0.859 0.018 0.971 0.627 0.940 0.278 0.791 0.000 0.873 0.037 0.794 0.001 0.931 0.324 0.860 0.020 0.840 0.010 0.833 0.011 0.841 0.011 0.878 0.035 0.945 0.585 0.817 0.022
Region 7 1.023 0.735 1.109 0.092 1.020 0.685 1.019 0.725 0.988 0.813 1.096 0.071 1.054 0.328 1.004 0.930 1.029 0.571 1.026 0.605 1.026 0.608 0.995 0.911 1.056 0.268 1.030 0.559 1.062 0.208 1.045 0.426 0.989 0.855
Region 8 0.616 0.011 0.572 0.000 0.520 0.000 0.677 0.003 0.627 0.001 0.727 0.033 0.532 0.000 0.712 0.006 0.590 0.000 0.693 0.002 0.556 0.000 0.574 0.000 0.817 0.170 0.378 0.000 0.661 0.001 0.395 0.000 0.594 0.001
Region 9 0.999 0.992 1.067 0.333 1.017 0.789 1.019 0.727 1.033 0.576 1.051 0.398 0.930 0.185 1.022 0.677 0.887 0.035 0.984 0.752 1.007 0.900 1.020 0.693 1.018 0.700 0.940 0.216 0.975 0.587 0.988 0.821 0.839 0.002
Region 10 1.168 0.057 1.207 0.022 1.054 0.366 1.077 0.217 1.079 0.236 1.210 0.002 1.019 0.780 1.101 0.129 0.997 0.963 1.120 0.085 1.122 0.085 0.971 0.696 1.307 0.001 1.203 0.024 1.256 0.001 1.017 0.830 0.982 0.814
Veteran 1.202 0.003 1.208 0.002 1.300 0.000 1.268 0.000 1.393 0.000 1.239 0.000 1.334 0.000 1.268 0.000 1.287 0.000 1.260 0.000 1.243 0.000 1.271 0.000 1.265 0.000 1.295 0.000 1.218 0.000 1.247 0.000 1.261 0.000

Forest Plot 1

StrokeF=mytotmod(Stroke)
subtotal=StrokeF[47:253,]
myforest(subtotal, 'Stroke')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=StrokeF[254:nrow(StrokeF),]
myforest(subtotal2, 'Stroke')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Skin Cancer

Skin_Cancer=lapply(mysurveys, mymod, a1[4])
## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge
SC=cbind(exp(summary(Skin_Cancer[[1]])$coefficient[,1]),summary(Skin_Cancer[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Skin_Cancer[[i]])$coefficient[,1]),summary(Skin_Cancer[[i]])$coefficient[,4])
  SC=cbind(SC,tmp)
}

SC=round(SC,3)
SC=mycol(SC)
myprint(SC[,-c(1:16)])
Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.001 0.000 0.001 0.000 0.001 0.000 0.001 0.000 0.001 0.000 0.001 0.000 0.001 0.000 0.001 0.000 0.001 0.000 0.001 0.000 0.001 0.000
Age_Gp_2 1.219 0.445 1.510 0.011 1.756 0.000 1.620 0.012 1.429 0.081 1.924 0.000 1.479 0.015 1.375 0.081 1.160 0.416 1.644 0.085 1.459 0.035
Age_Gp_3 2.824 0.000 3.229 0.000 4.689 0.000 4.256 0.000 3.508 0.000 4.887 0.000 2.745 0.000 3.072 0.000 3.360 0.000 4.387 0.000 3.934 0.000
Age_Gp_4 6.632 0.000 7.237 0.000 10.899 0.000 10.238 0.000 8.926 0.000 11.166 0.000 8.254 0.000 7.677 0.000 7.510 0.000 10.096 0.000 8.866 0.000
Age_Gp_5 12.262 0.000 13.913 0.000 20.179 0.000 18.335 0.000 16.156 0.000 20.505 0.000 14.720 0.000 14.452 0.000 14.583 0.000 17.898 0.000 17.116 0.000
Age_Gp_6 26.185 0.000 28.817 0.000 43.563 0.000 38.750 0.000 36.712 0.000 41.614 0.000 30.895 0.000 29.971 0.000 28.971 0.000 38.489 0.000 37.502 0.000
Caucasian 5.411 0.000 5.482 0.000 6.087 0.000 5.930 0.000 6.351 0.000 5.669 0.000 7.988 0.000 6.727 0.000 8.050 0.000 8.454 0.000 6.082 0.000
Hispanic 1.312 0.007 1.205 0.076 1.017 0.870 1.185 0.179 0.995 0.966 1.072 0.509 1.316 0.018 1.310 0.024 1.708 0.000 1.717 0.000 1.144 0.361
Male 1.085 0.002 1.077 0.004 1.048 0.050 1.063 0.024 1.059 0.020 1.055 0.039 1.023 0.408 1.054 0.054 1.056 0.030 1.023 0.463 1.008 0.759
Married 1.060 0.006 1.110 0.000 1.051 0.019 1.087 0.000 1.105 0.000 1.083 0.001 1.106 0.000 1.088 0.001 1.095 0.000 1.123 0.000 1.085 0.003
Income>=$75K 1.262 0.000 1.185 0.000 1.164 0.000 1.159 0.000 1.195 0.000 1.132 0.000 1.172 0.000 1.182 0.000 1.154 0.000 1.219 0.000 1.226 0.000
College Grad 1.219 0.000 1.246 0.000 1.268 0.000 1.246 0.000 1.234 0.000 1.295 0.000 1.237 0.000 1.248 0.000 1.285 0.000 1.251 0.000 1.277 0.000
Employed 0.737 0.000 0.796 0.000 0.780 0.000 0.805 0.000 0.807 0.000 0.749 0.000 0.801 0.000 0.768 0.000 0.750 0.000 0.744 0.000 0.718 0.000
Region 2 1.506 0.000 1.612 0.000 1.484 0.000 1.440 0.000 1.494 0.000 1.473 0.000 1.399 0.000 1.452 0.000 1.353 0.000 1.495 0.000 1.305 0.000
Region 3 1.026 0.544 0.914 0.052 0.980 0.627 0.977 0.574 1.007 0.881 0.974 0.543 0.979 0.611 0.960 0.404 0.917 0.055 1.025 0.595 0.917 0.045
Region 4 1.439 0.000 1.460 0.000 1.552 0.000 1.486 0.000 1.474 0.000 1.419 0.000 1.508 0.000 1.465 0.000 1.433 0.000 1.503 0.000 1.388 0.000
Region 5 1.039 0.321 1.042 0.245 1.086 0.029 1.094 0.013 1.060 0.132 1.038 0.342 1.096 0.040 1.042 0.310 1.044 0.238 1.064 0.127 1.071 0.108
Region 6 1.403 0.000 1.459 0.000 1.429 0.000 1.282 0.000 1.370 0.000 1.330 0.000 1.587 0.000 1.485 0.000 1.441 0.000 1.393 0.000 1.279 0.000
Region 7 1.571 0.000 1.591 0.000 1.616 0.000 1.514 0.000 1.554 0.000 1.559 0.000 1.561 0.000 1.535 0.000 1.568 0.000 1.517 0.000 1.294 0.000
Region 8 0.568 0.000 0.814 0.182 1.153 0.351 0.992 0.964 0.865 0.334 0.876 0.407 1.132 0.514 0.817 0.252 0.778 0.140 0.656 0.044 0.892 0.552
Region 9 1.065 0.089 1.092 0.017 1.159 0.000 0.991 0.780 1.068 0.058 1.063 0.086 1.084 0.014 1.024 0.509 1.050 0.137 1.054 0.140 1.036 0.319
Region 10 1.448 0.000 1.409 0.000 1.302 0.000 1.235 0.000 1.170 0.001 1.321 0.000 1.369 0.000 1.228 0.000 1.182 0.001 1.169 0.007 1.253 0.000
Veteran 1.314 0.000 1.288 0.000 1.295 0.000 1.360 0.000 1.289 0.000 1.276 0.000 1.334 0.000 1.266 0.000 1.400 0.000 1.276 0.000 1.426 0.000

Forest Plot 1

Skin_CancerF=mytotmod(Skin_Cancer)
subtotal=Skin_CancerF[185:299,]
myforest(subtotal, 'Skin Cancer')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=Skin_CancerF[300:nrow(Skin_CancerF),]
myforest(subtotal2, 'Skin Cancer')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Cancer

Cancer=lapply(mysurveys, mymod, a1[5])
## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge
C1=cbind(exp(summary(Cancer[[1]])$coefficient[,1]),summary(Cancer[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Cancer[[i]])$coefficient[,1]),summary(Cancer[[i]])$coefficient[,4])
  C1=cbind(C1,tmp)
}

C1=round(C1,3)
C1=mycol(C1)
myprint(C1[,-c(1:16)])
Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.013 0.000 0.010 0.000 0.009 0.000 0.008 0.000 0.009 0.000 0.009 0.000 0.008 0.000 0.008 0.000 0.009 0.000 0.006 0.000 0.009 0.000
Age_Gp_2 2.130 0.000 3.043 0.000 3.009 0.000 2.720 0.000 2.393 0.000 2.771 0.000 2.701 0.000 2.797 0.000 2.576 0.000 2.571 0.000 2.179 0.000
Age_Gp_3 3.290 0.000 3.929 0.000 4.477 0.000 4.996 0.000 3.792 0.000 5.094 0.000 4.775 0.000 5.035 0.000 4.070 0.000 4.515 0.000 4.242 0.000
Age_Gp_4 5.507 0.000 7.282 0.000 7.739 0.000 8.156 0.000 6.935 0.000 9.012 0.000 9.141 0.000 9.574 0.000 7.584 0.000 8.712 0.000 7.614 0.000
Age_Gp_5 9.267 0.000 12.575 0.000 12.435 0.000 13.226 0.000 11.627 0.000 13.821 0.000 14.876 0.000 14.878 0.000 12.578 0.000 15.967 0.000 12.845 0.000
Age_Gp_6 15.729 0.000 20.339 0.000 22.566 0.000 22.688 0.000 20.144 0.000 24.052 0.000 25.651 0.000 25.875 0.000 21.441 0.000 27.760 0.000 21.874 0.000
Caucasian 1.322 0.000 1.320 0.000 1.384 0.000 1.337 0.000 1.386 0.000 1.290 0.000 1.406 0.000 1.301 0.000 1.410 0.000 1.433 0.000 1.481 0.000
Hispanic 0.760 0.000 0.854 0.022 0.763 0.000 0.795 0.001 0.719 0.000 0.705 0.000 0.960 0.567 0.935 0.324 0.918 0.196 0.830 0.036 1.001 0.991
Male 0.592 0.000 0.614 0.000 0.594 0.000 0.618 0.000 0.618 0.000 0.618 0.000 0.628 0.000 0.650 0.000 0.663 0.000 0.705 0.000 0.679 0.000
Married 0.960 0.059 0.973 0.242 0.939 0.004 0.957 0.072 0.930 0.001 0.939 0.006 0.966 0.167 0.962 0.125 0.951 0.045 0.951 0.099 0.964 0.166
Income>=$75K 0.957 0.217 0.887 0.000 0.968 0.269 0.951 0.085 0.945 0.050 0.977 0.455 0.994 0.844 0.941 0.046 0.972 0.336 0.992 0.826 0.939 0.044
College Grad 0.986 0.549 0.990 0.664 0.978 0.333 1.019 0.422 1.025 0.279 1.048 0.056 1.007 0.773 1.062 0.018 0.974 0.284 1.030 0.307 1.034 0.178
Employed 0.632 0.000 0.682 0.000 0.679 0.000 0.628 0.000 0.673 0.000 0.645 0.000 0.609 0.000 0.662 0.000 0.671 0.000 0.656 0.000 0.644 0.000
Region 2 0.936 0.150 0.990 0.790 1.084 0.045 1.165 0.000 1.061 0.145 0.926 0.055 1.107 0.010 1.041 0.316 1.025 0.524 1.032 0.503 0.982 0.702
Region 3 1.006 0.898 0.950 0.224 1.018 0.654 0.995 0.911 1.044 0.300 0.913 0.023 0.979 0.594 0.989 0.797 0.996 0.931 1.012 0.806 0.882 0.003
Region 4 1.007 0.858 0.963 0.322 0.989 0.777 1.072 0.036 1.070 0.065 0.931 0.034 0.965 0.257 0.971 0.420 0.948 0.144 0.968 0.415 0.893 0.004
Region 5 0.986 0.713 0.998 0.944 1.063 0.100 1.166 0.000 1.075 0.054 0.996 0.913 1.077 0.078 0.969 0.408 1.008 0.815 1.045 0.311 0.931 0.088
Region 6 0.951 0.225 1.052 0.242 1.110 0.019 1.122 0.019 1.119 0.010 0.956 0.325 0.993 0.874 0.937 0.156 0.933 0.108 1.018 0.784 0.820 0.000
Region 7 1.021 0.571 0.961 0.286 1.003 0.930 1.031 0.347 1.072 0.048 0.928 0.023 0.981 0.566 0.980 0.555 1.016 0.635 1.000 0.997 0.880 0.001
Region 8 0.757 0.002 0.787 0.009 0.901 0.267 0.954 0.605 1.086 0.379 1.064 0.510 0.765 0.011 0.933 0.462 0.901 0.235 1.265 0.158 0.983 0.882
Region 9 0.994 0.870 1.002 0.950 1.038 0.310 1.035 0.314 1.049 0.155 0.937 0.058 1.010 0.743 0.937 0.051 0.961 0.216 0.981 0.600 0.914 0.011
Region 10 1.062 0.235 0.944 0.218 1.015 0.749 1.012 0.797 1.056 0.261 0.977 0.678 0.929 0.196 0.870 0.018 1.002 0.962 0.918 0.147 0.937 0.246
Veteran 1.633 0.000 1.551 0.000 1.549 0.000 1.453 0.000 1.483 0.000 1.448 0.000 1.525 0.000 1.475 0.000 1.468 0.000 1.520 0.000 1.390 0.000

Forest Plot 1

CancerF=mytotmod(Cancer)
subtotal=CancerF[185:299,]
myforest(subtotal, 'Cancer')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=CancerF[300:nrow(CancerF),]
myforest(subtotal2, 'Cancer')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

COPD

COPD=lapply(mysurveys, mymod, a1[6])
## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge
C2=cbind(exp(summary(COPD[[1]])$coefficient[,1]),summary(COPD[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(COPD[[i]])$coefficient[,1]),summary(COPD[[i]])$coefficient[,4])
  C2=cbind(C2,tmp)
}

C2=round(C2,3)
C2=mycol(C2)
myprint(C2[,-c(1:16)])
Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.045 0.000 0.043 0.000 0.036 0.000 0.034 0.000 0.034 0.000 0.039 0.000 0.032 0.000 0.036 0.000 0.031 0.000 0.025 0.000 0.026 0.000
Age_Gp_2 1.597 0.000 1.740 0.000 2.060 0.000 1.982 0.000 1.642 0.000 1.995 0.000 1.987 0.000 1.757 0.000 2.083 0.000 1.798 0.000 2.282 0.000
Age_Gp_3 2.486 0.000 2.639 0.000 2.834 0.000 3.045 0.000 2.558 0.000 3.094 0.000 3.408 0.000 3.008 0.000 3.302 0.000 3.184 0.000 3.429 0.000
Age_Gp_4 4.020 0.000 4.456 0.000 5.020 0.000 5.400 0.000 4.521 0.000 4.893 0.000 5.630 0.000 4.983 0.000 5.382 0.000 5.392 0.000 4.870 0.000
Age_Gp_5 4.841 0.000 5.500 0.000 6.327 0.000 6.655 0.000 6.017 0.000 6.537 0.000 8.085 0.000 6.894 0.000 7.797 0.000 8.367 0.000 8.098 0.000
Age_Gp_6 4.292 0.000 4.801 0.000 5.407 0.000 5.917 0.000 5.340 0.000 5.697 0.000 6.744 0.000 6.077 0.000 7.124 0.000 7.937 0.000 7.089 0.000
Caucasian 1.256 0.000 1.195 0.000 1.245 0.000 1.320 0.000 1.401 0.000 1.253 0.000 1.372 0.000 1.295 0.000 1.325 0.000 1.449 0.000 1.415 0.000
Hispanic 0.664 0.000 0.643 0.000 0.662 0.000 0.665 0.000 0.597 0.000 0.638 0.000 0.606 0.000 0.745 0.000 0.648 0.000 0.821 0.024 0.742 0.000
Male 0.771 0.000 0.807 0.000 0.820 0.000 0.821 0.000 0.842 0.000 0.827 0.000 0.832 0.000 0.803 0.000 0.821 0.000 0.837 0.000 0.853 0.000
Married 0.652 0.000 0.642 0.000 0.671 0.000 0.626 0.000 0.656 0.000 0.619 0.000 0.624 0.000 0.660 0.000 0.642 0.000 0.641 0.000 0.658 0.000
Income>=$75K 0.522 0.000 0.511 0.000 0.485 0.000 0.531 0.000 0.508 0.000 0.547 0.000 0.505 0.000 0.511 0.000 0.537 0.000 0.578 0.000 0.566 0.000
College Grad 0.491 0.000 0.477 0.000 0.469 0.000 0.479 0.000 0.457 0.000 0.458 0.000 0.463 0.000 0.488 0.000 0.469 0.000 0.472 0.000 0.452 0.000
Employed 0.467 0.000 0.449 0.000 0.478 0.000 0.459 0.000 0.453 0.000 0.462 0.000 0.446 0.000 0.468 0.000 0.503 0.000 0.486 0.000 0.508 0.000
Region 2 1.239 0.000 1.269 0.000 1.292 0.000 1.355 0.000 1.400 0.000 1.241 0.000 1.258 0.000 1.332 0.000 1.241 0.000 1.371 0.000 1.361 0.000
Region 3 0.879 0.006 0.929 0.125 0.922 0.055 0.879 0.003 0.956 0.323 0.855 0.000 0.832 0.000 0.856 0.001 0.879 0.004 0.840 0.000 0.887 0.007
Region 4 0.820 0.000 0.880 0.002 0.882 0.019 0.832 0.000 0.878 0.001 0.812 0.000 0.801 0.000 0.824 0.000 0.857 0.000 0.842 0.000 0.853 0.000
Region 5 0.905 0.015 0.879 0.001 0.919 0.033 0.889 0.003 0.908 0.023 0.813 0.000 0.865 0.002 0.803 0.000 0.792 0.000 0.792 0.000 0.929 0.109
Region 6 0.701 0.000 0.804 0.000 0.807 0.000 0.796 0.000 0.794 0.000 0.740 0.000 0.756 0.000 0.738 0.000 0.751 0.000 0.910 0.188 0.819 0.001
Region 7 1.032 0.410 1.016 0.689 1.017 0.613 1.046 0.209 1.053 0.159 0.950 0.127 1.032 0.371 1.033 0.372 1.014 0.678 0.994 0.887 1.027 0.511
Region 8 0.603 0.000 0.669 0.000 0.688 0.000 0.709 0.000 0.882 0.204 0.830 0.053 0.877 0.212 1.009 0.930 0.891 0.229 0.944 0.615 0.920 0.436
Region 9 0.838 0.000 0.872 0.001 0.841 0.000 0.853 0.000 0.903 0.010 0.799 0.000 0.836 0.000 0.854 0.000 0.857 0.000 0.884 0.001 0.918 0.021
Region 10 0.979 0.656 0.956 0.354 0.972 0.567 0.953 0.300 1.044 0.381 0.863 0.009 0.907 0.089 1.032 0.610 0.958 0.366 0.953 0.412 1.094 0.093
Veteran 1.332 0.000 1.360 0.000 1.375 0.000 1.340 0.000 1.340 0.000 1.379 0.000 1.346 0.000 1.390 0.000 1.418 0.000 1.514 0.000 1.452 0.000

Forest Plot 1

COPDF=mytotmod(COPD)
subtotal=COPDF[185:299,]
myforest(subtotal, 'COPD')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=COPDF[300:nrow(COPDF),]
myforest(subtotal2, 'COPD')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Arthritis

Arthritis=lapply(mysurveys, mymod, a1[7])
## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge
A2=cbind(exp(summary(Arthritis[[1]])$coefficient[,1]),summary(Arthritis[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Arthritis[[i]])$coefficient[,1]),summary(Arthritis[[i]])$coefficient[,4])
  A2=cbind(A2,tmp)
}

A2=round(A2,3)
A2=mycol(A2)
myprint(A2[,-c(1:16)])
Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.058 0.000 0.061 0.000 0.059 0.000 0.054 0.000 0.051 0.000 0.054 0.000 0.056 0.000 0.058 0.000 0.058 0.000 0.047 0.000 0.043 0.000
Age_Gp_2 2.799 0.000 2.806 0.000 2.799 0.000 3.300 0.000 2.826 0.000 2.785 0.000 2.962 0.000 2.723 0.000 2.729 0.000 2.994 0.000 3.215 0.000
Age_Gp_3 6.060 0.000 6.110 0.000 6.145 0.000 7.285 0.000 6.265 0.000 6.614 0.000 6.335 0.000 6.155 0.000 5.759 0.000 6.001 0.000 6.969 0.000
Age_Gp_4 13.090 0.000 12.759 0.000 12.951 0.000 14.828 0.000 13.411 0.000 13.460 0.000 13.405 0.000 12.542 0.000 11.402 0.000 12.750 0.000 13.573 0.000
Age_Gp_5 22.209 0.000 22.393 0.000 21.656 0.000 24.639 0.000 21.903 0.000 22.906 0.000 22.025 0.000 21.196 0.000 19.098 0.000 22.213 0.000 23.690 0.000
Age_Gp_6 27.638 0.000 27.175 0.000 27.651 0.000 31.984 0.000 27.740 0.000 28.508 0.000 27.297 0.000 26.642 0.000 24.318 0.000 30.478 0.000 30.183 0.000
Caucasian 1.168 0.000 1.168 0.000 1.161 0.000 1.169 0.000 1.262 0.000 1.268 0.000 1.219 0.000 1.220 0.000 1.259 0.000 1.268 0.000 1.254 0.000
Hispanic 0.703 0.000 0.712 0.000 0.650 0.000 0.677 0.000 0.712 0.000 0.697 0.000 0.651 0.000 0.740 0.000 0.695 0.000 0.805 0.000 0.711 0.000
Male 0.682 0.000 0.682 0.000 0.673 0.000 0.673 0.000 0.663 0.000 0.655 0.000 0.636 0.000 0.656 0.000 0.653 0.000 0.626 0.000 0.647 0.000
Married 0.860 0.000 0.852 0.000 0.862 0.000 0.838 0.000 0.856 0.000 0.853 0.000 0.839 0.000 0.844 0.000 0.844 0.000 0.841 0.000 0.910 0.000
Income>=$75K 0.789 0.000 0.806 0.000 0.771 0.000 0.797 0.000 0.794 0.000 0.773 0.000 0.790 0.000 0.822 0.000 0.848 0.000 0.832 0.000 0.866 0.000
College Grad 0.686 0.000 0.650 0.000 0.673 0.000 0.669 0.000 0.663 0.000 0.671 0.000 0.668 0.000 0.688 0.000 0.718 0.000 0.691 0.000 0.703 0.000
Employed 0.618 0.000 0.603 0.000 0.611 0.000 0.608 0.000 0.604 0.000 0.607 0.000 0.615 0.000 0.637 0.000 0.675 0.000 0.669 0.000 0.657 0.000
Region 2 1.012 0.689 1.177 0.000 1.050 0.067 1.189 0.000 1.256 0.000 1.203 0.000 1.154 0.000 1.222 0.000 1.179 0.000 1.237 0.000 1.199 0.000
Region 3 0.885 0.000 0.883 0.000 0.950 0.051 0.884 0.000 0.960 0.130 0.914 0.000 0.890 0.000 0.834 0.000 0.854 0.000 0.839 0.000 0.923 0.002
Region 4 0.830 0.000 0.850 0.000 0.835 0.000 0.829 0.000 0.881 0.000 0.884 0.000 0.821 0.000 0.865 0.000 0.853 0.000 0.861 0.000 0.918 0.001
Region 5 0.840 0.000 0.828 0.000 0.899 0.000 0.928 0.002 0.939 0.013 0.929 0.004 0.892 0.000 0.897 0.000 0.862 0.000 0.859 0.000 0.957 0.106
Region 6 0.756 0.000 0.858 0.000 0.832 0.000 0.757 0.000 0.807 0.000 0.748 0.000 0.787 0.000 0.785 0.000 0.786 0.000 0.797 0.000 0.842 0.000
Region 7 0.914 0.000 0.878 0.000 0.919 0.000 0.924 0.000 0.958 0.065 0.885 0.000 0.856 0.000 0.914 0.000 0.887 0.000 0.908 0.000 1.037 0.140
Region 8 0.861 0.002 1.059 0.223 1.077 0.131 1.093 0.071 1.062 0.228 1.066 0.211 0.956 0.447 1.030 0.578 0.942 0.239 1.072 0.356 0.963 0.558
Region 9 0.823 0.000 0.839 0.000 0.828 0.000 0.825 0.000 0.913 0.000 0.885 0.000 0.809 0.000 0.874 0.000 0.820 0.000 0.890 0.000 0.932 0.002
Region 10 0.838 0.000 0.875 0.000 0.874 0.000 0.778 0.000 0.905 0.002 0.921 0.018 0.922 0.030 0.876 0.000 0.861 0.000 0.910 0.016 0.955 0.191
Veteran 1.160 0.000 1.232 0.000 1.201 0.000 1.192 0.000 1.246 0.000 1.300 0.000 1.312 0.000 1.327 0.000 1.292 0.000 1.426 0.000 1.348 0.000

Forest Plot 1

ArthritisF=mytotmod(Arthritis)
subtotal=ArthritisF[185:299,]
myforest(subtotal, 'Arthritis')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=ArthritisF[300:nrow(ArthritisF),]
myforest(subtotal2, 'Arthritis')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Depression

Depression=lapply(mysurveys, mymod, a1[8])
D2=cbind(exp(summary(Depression[[1]])$coefficient[,1]),summary(Depression[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Depression[[i]])$coefficient[,1]),summary(Depression[[i]])$coefficient[,4])
  D2=cbind(D2,tmp)
}

D2=round(D2,3)
D2=mycol(D2)
myprint(D2)
Y03 p Y04 p Y05 p Y06 p Y07 p Y08 p Y09 p Y10 p Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 1.427 0.000 1.349 0.000 1.289 0.000 1.437 0.000 1.430 0.000 1.335 0.000 1.308 0.000 1.264 0.000 1.258 0.000 1.308 0.000 1.246 0.000 1.255 0.000 1.286 0.000 1.353 0.000 1.500 0.000 1.633 0.000 1.874 0.000 1.505 0.000 2.081 0.000
Age_Gp_2 0.919 0.012 0.927 0.028 0.901 0.002 0.932 0.079 0.910 0.014 0.920 0.026 0.977 0.542 0.997 0.930 0.971 0.317 0.944 0.045 0.958 0.116 0.993 0.804 0.899 0.000 0.883 0.000 0.870 0.000 0.806 0.000 0.800 0.000 0.823 0.000 0.751 0.000
Age_Gp_3 0.803 0.000 0.834 0.000 0.861 0.000 0.870 0.000 0.881 0.000 0.904 0.005 0.970 0.399 0.977 0.516 0.991 0.758 0.926 0.009 0.886 0.000 0.925 0.006 0.848 0.000 0.794 0.000 0.764 0.000 0.673 0.000 0.642 0.000 0.659 0.000 0.590 0.000
Age_Gp_4 0.706 0.000 0.737 0.000 0.756 0.000 0.769 0.000 0.748 0.000 0.832 0.000 0.855 0.000 0.901 0.002 0.879 0.000 0.840 0.000 0.832 0.000 0.815 0.000 0.748 0.000 0.722 0.000 0.652 0.000 0.563 0.000 0.516 0.000 0.539 0.000 0.461 0.000
Age_Gp_5 0.448 0.000 0.501 0.000 0.527 0.000 0.559 0.000 0.568 0.000 0.588 0.000 0.615 0.000 0.678 0.000 0.668 0.000 0.660 0.000 0.661 0.000 0.663 0.000 0.590 0.000 0.540 0.000 0.513 0.000 0.453 0.000 0.399 0.000 0.420 0.000 0.352 0.000
Age_Gp_6 0.226 0.000 0.240 0.000 0.237 0.000 0.245 0.000 0.254 0.000 0.261 0.000 0.283 0.000 0.306 0.000 0.299 0.000 0.311 0.000 0.306 0.000 0.325 0.000 0.296 0.000 0.263 0.000 0.261 0.000 0.222 0.000 0.208 0.000 0.222 0.000 0.191 0.000
Caucasian 1.113 0.000 1.152 0.000 1.177 0.000 1.162 0.000 1.136 0.000 1.194 0.000 1.121 0.000 1.163 0.000 1.166 0.000 1.167 0.000 1.163 0.000 1.210 0.000 1.279 0.000 1.291 0.000 1.292 0.000 1.318 0.000 1.361 0.000 1.430 0.000 1.288 0.000
Hispanic 0.936 0.102 0.922 0.039 0.841 0.000 0.915 0.029 0.849 0.000 0.953 0.176 1.008 0.811 1.014 0.647 1.021 0.475 0.967 0.269 0.936 0.026 0.944 0.050 0.940 0.030 0.810 0.000 0.847 0.000 0.814 0.000 0.812 0.000 0.872 0.000 0.710 0.000
Male 0.635 0.000 0.616 0.000 0.623 0.000 0.636 0.000 0.653 0.000 0.633 0.000 0.648 0.000 0.656 0.000 0.669 0.000 0.656 0.000 0.658 0.000 0.657 0.000 0.654 0.000 0.633 0.000 0.635 0.000 0.622 0.000 0.614 0.000 0.548 0.000 0.568 0.000
Married 0.687 0.000 0.709 0.000 0.715 0.000 0.695 0.000 0.691 0.000 0.683 0.000 0.694 0.000 0.715 0.000 0.698 0.000 0.703 0.000 0.697 0.000 0.687 0.000 0.671 0.000 0.656 0.000 0.657 0.000 0.657 0.000 0.640 0.000 0.680 0.000 0.685 0.000
Income>=$75K 0.904 0.000 0.855 0.000 0.832 0.000 0.848 0.000 0.826 0.000 0.847 0.000 0.796 0.000 0.793 0.000 0.790 0.000 0.788 0.000 0.803 0.000 0.824 0.000 0.877 0.000 0.863 0.000 0.864 0.000 0.857 0.000 0.922 0.000 0.992 0.691 1.048 0.010
College Grad 0.901 0.000 0.907 0.000 0.914 0.000 0.909 0.000 0.940 0.000 0.921 0.000 0.934 0.000 0.880 0.000 0.924 0.000 0.899 0.000 0.936 0.000 0.923 0.000 0.930 0.000 0.991 0.541 0.980 0.200 1.011 0.476 1.041 0.006 1.143 0.000 1.069 0.000
Employed 0.795 0.000 0.818 0.000 0.796 0.000 0.790 0.000 0.784 0.000 0.777 0.000 0.778 0.000 0.740 0.000 0.720 0.000 0.741 0.000 0.727 0.000 0.758 0.000 0.756 0.000 0.751 0.000 0.792 0.000 0.797 0.000 0.812 0.000 0.815 0.000 0.843 0.000
Region 2 0.794 0.000 0.764 0.000 0.791 0.000 0.741 0.000 0.708 0.000 0.872 0.000 0.802 0.000 0.744 0.000 0.839 0.000 0.864 0.000 0.834 0.000 0.845 0.000 0.858 0.000 0.949 0.038 0.907 0.000 0.964 0.162 1.010 0.696 1.009 0.752 0.999 0.983
Region 3 0.996 0.898 1.017 0.566 0.978 0.396 0.841 0.000 0.889 0.000 0.885 0.000 0.896 0.000 0.919 0.001 0.943 0.028 0.930 0.008 0.944 0.022 0.889 0.000 0.897 0.000 0.968 0.187 0.953 0.049 0.907 0.000 0.848 0.000 0.955 0.070 0.900 0.000
Region 4 1.041 0.166 0.994 0.853 1.011 0.697 0.854 0.000 0.979 0.456 0.942 0.037 0.954 0.104 0.960 0.138 0.951 0.055 0.963 0.108 0.976 0.360 0.875 0.000 0.966 0.146 1.022 0.322 0.949 0.010 0.990 0.645 1.036 0.116 1.135 0.000 1.139 0.000
Region 5 0.983 0.502 0.945 0.041 0.913 0.000 0.816 0.000 0.931 0.002 0.941 0.012 0.929 0.004 0.874 0.000 0.966 0.147 0.976 0.271 0.993 0.763 0.928 0.001 0.958 0.074 1.023 0.357 0.974 0.331 1.002 0.942 0.881 0.000 1.014 0.591 1.000 0.993
Region 6 1.236 0.000 1.081 0.033 1.219 0.000 1.144 0.000 1.058 0.096 1.066 0.024 1.041 0.129 1.057 0.035 1.054 0.040 1.087 0.001 1.079 0.006 0.932 0.014 1.029 0.260 1.075 0.005 0.957 0.117 1.084 0.002 0.994 0.824 1.210 0.000 1.186 0.000
Region 7 0.844 0.000 0.849 0.000 0.914 0.000 0.806 0.000 0.820 0.000 0.834 0.000 0.782 0.000 0.817 0.000 0.871 0.000 0.866 0.000 0.865 0.000 0.808 0.000 0.856 0.000 0.839 0.000 0.827 0.000 0.896 0.000 0.874 0.000 0.925 0.002 0.959 0.068
Region 8 0.441 0.000 0.684 0.000 0.943 0.331 0.696 0.000 0.723 0.000 0.682 0.000 0.435 0.000 0.470 0.000 0.487 0.000 0.473 0.000 0.595 0.000 0.485 0.000 0.517 0.000 0.630 0.000 0.576 0.000 0.664 0.000 0.552 0.000 0.503 0.000 0.525 0.000
Region 9 0.854 0.000 0.844 0.000 0.893 0.000 0.757 0.000 0.782 0.000 0.820 0.000 0.850 0.000 0.802 0.000 0.808 0.000 0.803 0.000 0.804 0.000 0.753 0.000 0.783 0.000 0.834 0.000 0.794 0.000 0.889 0.000 0.884 0.000 0.992 0.709 0.973 0.185
Region 10 0.881 0.000 0.885 0.000 0.730 0.000 0.721 0.000 0.790 0.000 0.778 0.000 0.889 0.000 0.897 0.000 0.910 0.001 0.873 0.000 0.764 0.000 0.731 0.000 0.788 0.000 0.890 0.000 0.897 0.001 0.919 0.013 0.921 0.009 1.033 0.334 1.064 0.054
Veteran 0.951 0.085 0.981 0.481 0.988 0.630 0.947 0.056 0.912 0.000 0.962 0.125 0.969 0.204 0.946 0.017 0.938 0.004 0.944 0.012 0.957 0.057 0.960 0.068 0.982 0.421 1.002 0.946 0.990 0.684 0.980 0.415 1.010 0.690 1.042 0.172 1.008 0.765

Forest Plot 1

DepressionF=mytotmod(Depression)
subtotal=DepressionF[1:230,]
myforest(subtotal, 'Depression')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=DepressionF[231:nrow(DepressionF),]
myforest(subtotal2, 'Depression')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Kidney Disease

Kidney_Disease=lapply(mysurveys, mymod, a1[9])
## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge

## Warning: glm.fit: algorithm did not converge
KD=cbind(exp(summary(Kidney_Disease[[1]])$coefficient[,1]),summary(Kidney_Disease[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Kidney_Disease[[i]])$coefficient[,1]),summary(Kidney_Disease[[i]])$coefficient[,4])
  KD=cbind(KD,tmp)
}

KD=round(KD,3)
KD=mycol(KD)
myprint(KD[,-c(1:16)])
Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.015 0.000 0.013 0.000 0.013 0.000 0.013 0.000 0.010 0.000 0.011 0.000 0.017 0.000 0.013 0.000 0.011 0.000 0.009 0.000 0.011 0.000
Age_Gp_2 1.224 0.207 1.914 0.000 1.574 0.002 1.878 0.000 2.161 0.000 2.160 0.000 1.666 0.001 1.556 0.012 2.181 0.000 1.754 0.001 1.939 0.000
Age_Gp_3 2.234 0.000 2.502 0.000 2.281 0.000 3.198 0.000 3.702 0.000 3.790 0.000 2.599 0.000 2.450 0.000 2.869 0.000 3.332 0.000 3.043 0.000
Age_Gp_4 3.179 0.000 3.906 0.000 3.723 0.000 4.463 0.000 5.057 0.000 5.810 0.000 3.732 0.000 4.226 0.000 4.951 0.000 5.190 0.000 4.716 0.000
Age_Gp_5 4.493 0.000 5.673 0.000 4.976 0.000 5.959 0.000 7.197 0.000 7.410 0.000 5.290 0.000 5.993 0.000 6.777 0.000 6.969 0.000 7.043 0.000
Age_Gp_6 5.176 0.000 6.186 0.000 5.971 0.000 7.864 0.000 8.833 0.000 9.587 0.000 6.593 0.000 8.067 0.000 9.153 0.000 10.958 0.000 9.892 0.000
Caucasian 0.858 0.004 0.872 0.011 0.874 0.020 0.818 0.000 0.949 0.284 0.919 0.058 0.843 0.004 0.791 0.000 0.836 0.000 0.905 0.094 0.891 0.022
Hispanic 1.069 0.404 1.158 0.074 1.064 0.493 0.980 0.799 1.080 0.355 1.071 0.343 0.809 0.010 1.090 0.321 1.110 0.186 1.009 0.925 1.005 0.952
Male 0.944 0.192 0.974 0.567 0.899 0.018 0.884 0.002 0.981 0.640 0.950 0.175 0.900 0.010 1.042 0.365 1.077 0.054 0.977 0.631 0.988 0.747
Married 0.870 0.000 0.832 0.000 0.857 0.000 0.817 0.000 0.788 0.000 0.817 0.000 0.848 0.000 0.843 0.000 0.834 0.000 0.836 0.000 0.801 0.000
Income>=$75K 0.776 0.000 0.719 0.000 0.658 0.000 0.741 0.000 0.775 0.000 0.736 0.000 0.849 0.014 0.784 0.000 0.762 0.000 0.750 0.000 0.776 0.000
College Grad 0.846 0.000 0.719 0.000 0.814 0.000 0.829 0.000 0.791 0.000 0.772 0.000 0.735 0.000 0.823 0.000 0.821 0.000 0.820 0.000 0.819 0.000
Employed 0.504 0.000 0.460 0.000 0.480 0.000 0.480 0.000 0.485 0.000 0.449 0.000 0.446 0.000 0.489 0.000 0.463 0.000 0.500 0.000 0.450 0.000
Region 2 0.875 0.093 0.897 0.088 0.974 0.684 1.061 0.354 1.000 0.996 1.022 0.697 1.069 0.272 1.181 0.005 1.090 0.128 1.116 0.100 1.129 0.059
Region 3 0.959 0.604 0.817 0.016 0.891 0.076 0.807 0.003 0.778 0.000 0.743 0.000 0.812 0.001 0.939 0.354 0.840 0.007 0.942 0.388 0.894 0.058
Region 4 1.093 0.202 1.085 0.215 1.148 0.054 1.082 0.153 1.036 0.538 0.899 0.051 1.042 0.419 0.981 0.721 0.977 0.672 1.037 0.530 1.055 0.329
Region 5 0.801 0.001 0.810 0.000 0.903 0.116 1.012 0.854 0.817 0.001 0.791 0.000 0.959 0.555 0.924 0.219 0.789 0.000 0.821 0.006 0.899 0.098
Region 6 0.916 0.212 0.967 0.629 1.158 0.070 0.926 0.315 0.897 0.115 0.914 0.165 1.054 0.485 0.934 0.313 0.940 0.344 0.928 0.438 0.843 0.033
Region 7 0.955 0.478 1.022 0.722 1.081 0.143 1.070 0.222 0.935 0.240 0.895 0.022 0.921 0.113 1.011 0.833 1.094 0.082 1.058 0.361 1.099 0.083
Region 8 0.587 0.000 0.620 0.000 0.791 0.048 0.765 0.033 0.696 0.003 0.786 0.040 0.954 0.698 0.744 0.016 0.752 0.009 0.848 0.220 0.933 0.589
Region 9 0.793 0.001 0.887 0.055 0.839 0.004 0.886 0.030 0.842 0.002 0.868 0.009 0.895 0.033 0.858 0.002 0.888 0.015 0.952 0.356 0.901 0.039
Region 10 1.042 0.587 1.007 0.931 1.190 0.021 1.038 0.583 0.966 0.644 0.909 0.221 1.028 0.742 1.192 0.051 1.123 0.106 1.012 0.884 0.999 0.987
Veteran 1.103 0.068 1.181 0.003 1.201 0.002 1.156 0.003 1.112 0.041 1.195 0.000 1.160 0.008 1.123 0.053 1.117 0.033 1.297 0.000 1.140 0.008

Forest Plot 1

Kidney_DiseaseF=mytotmod(Kidney_Disease)
subtotal=Kidney_DiseaseF[185:299,]
myforest(subtotal, 'Kidney_Disease')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=Kidney_DiseaseF[300:nrow(Kidney_DiseaseF),]
myforest(subtotal2, 'Kidney_Disease')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Diabetes

Diabetes=lapply(mysurveys, mymod, a1[10])
Dia=cbind(exp(summary(Diabetes[[1]])$coefficient[,1]),summary(Diabetes[[1]])$coefficient[,4])
for (i in 2:19){
  tmp=cbind(exp(summary(Diabetes[[i]])$coefficient[,1]),summary(Diabetes[[i]])$coefficient[,4])
  Dia=cbind(Dia,tmp)
}

Dia=round(Dia,3)
Dia=mycol(Dia)
myprint(Dia)
Y03 p Y04 p Y05 p Y06 p Y07 p Y08 p Y09 p Y10 p Y11 p Y12 p Y13 p Y14 p Y15 p Y16 p Y17 p Y18 p Y19 p Y20 p Y21 p
Intercept 0.017 0.000 0.013 0.000 0.014 0.000 0.011 0.000 0.016 0.000 0.017 0.000 0.019 0.000 0.014 0.000 0.015 0.000 0.016 0.000 0.018 0.000 0.014 0.000 0.012 0.000 0.014 0.000 0.017 0.000 0.020 0.000 0.017 0.000 0.016 0.000 0.020 0.000
Age_Gp_2 2.639 0.000 2.301 0.000 3.011 0.000 2.673 0.000 2.375 0.000 2.713 0.000 2.336 0.000 3.393 0.000 2.724 0.000 2.454 0.000 2.102 0.000 2.826 0.000 2.690 0.000 2.501 0.000 2.146 0.000 2.073 0.000 2.232 0.000 2.333 0.000 2.087 0.000
Age_Gp_3 6.349 0.000 6.928 0.000 7.224 0.000 7.366 0.000 6.374 0.000 6.910 0.000 5.797 0.000 7.549 0.000 7.493 0.000 7.141 0.000 5.688 0.000 7.700 0.000 8.649 0.000 7.786 0.000 6.456 0.000 5.658 0.000 6.286 0.000 6.853 0.000 5.637 0.000
Age_Gp_4 12.843 0.000 14.253 0.000 14.701 0.000 16.868 0.000 13.464 0.000 13.947 0.000 11.736 0.000 15.982 0.000 16.041 0.000 14.253 0.000 13.060 0.000 17.687 0.000 18.601 0.000 17.603 0.000 15.131 0.000 13.372 0.000 15.597 0.000 15.247 0.000 12.451 0.000
Age_Gp_5 22.863 0.000 25.695 0.000 27.807 0.000 31.082 0.000 24.837 0.000 25.488 0.000 21.794 0.000 30.038 0.000 26.824 0.000 24.036 0.000 21.591 0.000 29.721 0.000 32.508 0.000 28.778 0.000 24.965 0.000 20.964 0.000 24.443 0.000 24.207 0.000 20.320 0.000
Age_Gp_6 21.482 0.000 26.426 0.000 28.153 0.000 33.012 0.000 26.984 0.000 27.232 0.000 24.232 0.000 32.682 0.000 31.111 0.000 28.025 0.000 26.149 0.000 36.072 0.000 39.365 0.000 35.190 0.000 29.930 0.000 26.515 0.000 30.916 0.000 30.199 0.000 24.034 0.000
Caucasian 0.556 0.000 0.565 0.000 0.566 0.000 0.571 0.000 0.585 0.000 0.564 0.000 0.566 0.000 0.571 0.000 0.595 0.000 0.607 0.000 0.576 0.000 0.598 0.000 0.584 0.000 0.627 0.000 0.590 0.000 0.594 0.000 0.596 0.000 0.624 0.000 0.592 0.000
Hispanic 0.879 0.072 0.876 0.059 0.948 0.383 0.962 0.521 1.003 0.960 0.986 0.769 0.993 0.882 0.979 0.589 0.985 0.718 1.072 0.116 1.032 0.465 1.043 0.307 0.981 0.639 0.999 0.979 1.031 0.508 0.970 0.500 1.088 0.046 1.076 0.161 1.074 0.131
Male 1.177 0.000 1.289 0.000 1.253 0.000 1.353 0.000 1.233 0.000 1.286 0.000 1.290 0.000 1.289 0.000 1.173 0.000 1.227 0.000 1.147 0.000 1.243 0.000 1.244 0.000 1.214 0.000 1.228 0.000 1.212 0.000 1.219 0.000 1.231 0.000 1.215 0.000
Married 0.910 0.001 0.910 0.001 0.913 0.000 0.894 0.000 0.900 0.000 0.879 0.000 0.887 0.000 0.881 0.000 0.935 0.001 0.915 0.000 0.951 0.015 0.922 0.000 0.945 0.005 0.946 0.005 0.957 0.046 0.966 0.125 0.919 0.000 0.930 0.006 0.965 0.127
Income>=$75K 0.692 0.000 0.633 0.000 0.668 0.000 0.648 0.000 0.674 0.000 0.678 0.000 0.694 0.000 0.693 0.000 0.676 0.000 0.691 0.000 0.682 0.000 0.697 0.000 0.743 0.000 0.684 0.000 0.685 0.000 0.689 0.000 0.724 0.000 0.703 0.000 0.778 0.000
College Grad 0.692 0.000 0.716 0.000 0.662 0.000 0.674 0.000 0.715 0.000 0.689 0.000 0.664 0.000 0.693 0.000 0.669 0.000 0.657 0.000 0.651 0.000 0.675 0.000 0.665 0.000 0.673 0.000 0.633 0.000 0.668 0.000 0.658 0.000 0.644 0.000 0.653 0.000
Employed 0.641 0.000 0.650 0.000 0.664 0.000 0.704 0.000 0.686 0.000 0.666 0.000 0.715 0.000 0.663 0.000 0.675 0.000 0.679 0.000 0.668 0.000 0.673 0.000 0.647 0.000 0.647 0.000 0.661 0.000 0.661 0.000 0.687 0.000 0.740 0.000 0.707 0.000
Region 2 1.135 0.010 1.123 0.016 1.133 0.004 1.302 0.000 1.186 0.000 1.103 0.008 1.146 0.000 1.150 0.000 1.129 0.002 1.111 0.001 1.199 0.000 1.212 0.000 1.279 0.000 1.232 0.000 1.204 0.000 1.249 0.000 1.224 0.000 1.253 0.000 1.310 0.000
Region 3 0.902 0.040 1.000 0.994 0.951 0.230 0.963 0.398 0.913 0.022 0.881 0.001 0.917 0.023 0.960 0.240 0.958 0.259 0.901 0.010 0.966 0.339 0.936 0.065 0.897 0.003 0.927 0.027 0.928 0.032 0.965 0.331 0.891 0.002 0.889 0.002 0.932 0.048
Region 4 0.734 0.000 0.846 0.001 0.833 0.000 0.936 0.174 0.828 0.000 0.798 0.000 0.825 0.000 0.815 0.000 0.864 0.000 0.839 0.000 0.855 0.000 0.820 0.000 0.816 0.000 0.828 0.000 0.802 0.000 0.845 0.000 0.814 0.000 0.833 0.000 0.840 0.000
Region 5 0.827 0.000 0.925 0.099 0.877 0.002 0.916 0.030 0.881 0.000 0.838 0.000 0.868 0.000 0.850 0.000 0.908 0.004 0.882 0.000 0.895 0.001 0.922 0.014 0.879 0.000 0.895 0.001 0.892 0.004 0.865 0.000 0.807 0.000 0.809 0.000 0.866 0.000
Region 6 0.872 0.034 0.962 0.563 0.825 0.001 0.985 0.790 0.801 0.000 0.844 0.000 0.905 0.006 0.830 0.000 0.801 0.000 0.883 0.002 0.923 0.058 0.887 0.004 0.903 0.011 0.888 0.003 0.877 0.003 0.892 0.004 0.805 0.000 0.788 0.000 0.913 0.070
Region 7 0.950 0.247 1.039 0.370 1.012 0.750 1.079 0.040 0.979 0.470 0.968 0.325 1.005 0.876 0.992 0.791 1.011 0.743 0.971 0.362 1.015 0.606 0.976 0.404 0.988 0.686 1.001 0.970 0.927 0.011 1.040 0.197 0.963 0.201 0.969 0.366 1.083 0.016
Region 8 0.995 0.950 1.051 0.580 1.052 0.532 1.026 0.740 0.932 0.317 0.868 0.030 0.932 0.284 0.922 0.243 0.968 0.583 1.023 0.693 0.935 0.269 0.972 0.615 1.057 0.339 0.945 0.353 0.981 0.762 0.925 0.209 0.916 0.124 0.900 0.242 0.954 0.512
Region 9 0.826 0.000 0.921 0.069 0.896 0.008 0.925 0.066 0.819 0.000 0.882 0.001 0.849 0.000 0.890 0.001 0.940 0.064 0.919 0.010 0.898 0.001 0.968 0.289 0.943 0.058 0.926 0.011 0.909 0.001 0.971 0.319 0.922 0.003 0.922 0.010 0.960 0.187
Region 10 0.994 0.910 1.084 0.121 1.021 0.645 1.098 0.087 1.111 0.003 1.046 0.276 1.030 0.495 1.029 0.453 1.067 0.109 1.034 0.404 1.065 0.139 1.043 0.263 1.120 0.006 1.051 0.262 1.095 0.060 1.154 0.003 1.062 0.167 1.109 0.034 1.012 0.802
Veteran 1.169 0.000 1.103 0.018 1.050 0.184 1.095 0.014 1.142 0.000 1.068 0.032 1.091 0.004 1.065 0.013 1.156 0.000 1.124 0.000 1.184 0.000 1.057 0.040 1.099 0.001 1.122 0.000 1.061 0.052 1.078 0.015 1.095 0.001 1.145 0.000 1.061 0.058

Forest Plot 1

DiabetesF=mytotmod(Diabetes)
subtotal=DiabetesF[1:230,]
myforest(subtotal, 'Diabetes')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Forest Plot 2

subtotal2=DiabetesF[231:nrow(DiabetesF),]
myforest(subtotal2, 'Diabetes')
## Warning: `geom_hline()`: Ignoring `mapping` because `yintercept` was provided.

Combined Years

Models

clust=makeCluster(10)
registerDoParallel(clust)

st1=mymod1(myjoinedsurvey,a1[1])
st2=mymod1(myjoinedsurvey,a1[2])
st3=mymod1(myjoinedsurvey,a1[3])
st4=mymod1(myjoinedsurvey,a1[4])
st5=mymod1(myjoinedsurvey,a1[5])
st6=mymod1(myjoinedsurvey,a1[6])
st7=mymod1(myjoinedsurvey,a1[7])
st8=mymod1(myjoinedsurvey,a1[8])
st9=mymod1(myjoinedsurvey,a1[9])
st10=mymod1(myjoinedsurvey,a1[10])

myodds=function(x){cbind(exp(summary(x)$coefficients[,1]), summary(x)$coefficients[,4])}
mymcfad=function(x) 1-(x$deviance/x$null.deviance)

Odds Ratios

or1=cbind(myodds(st1),myodds(st2),myodds(st3),myodds(st4),myodds(st5),myodds(st6),
          myodds(st7),myodds(st8),myodds(st9),myodds(st10))
colnames(or1)=c(a1[1],"p", a1[2],"p", a1[3], "p", a1[4], "p", a1[5], "p",
               a1[6],"p", a1[7],"p", a1[8], "p", a1[9], "p", a1[10], "p")
myprint(or1)
Overweight.Obese p Heart.Disease p Stroke p Skin.Cancer p Cancer p COPD p Arthritis p Depression p Kidney.Disease p Diabetes p
(Intercept) 0.491 0.000 0.004 0.000 0.007 0.000 0.001 0.000 0.009 0.000 0.032 0.000 0.054 0.000 1.384 0.000 0.011 0.000 0.015 0.000
as.factor(Age)2 1.963 0.000 2.026 0.000 2.578 0.000 1.473 0.000 2.600 0.000 1.881 0.000 2.892 0.000 0.883 0.000 1.782 0.000 2.347 0.000
as.factor(Age)3 2.710 0.000 4.448 0.000 5.427 0.000 3.598 0.000 4.315 0.000 2.958 0.000 6.304 0.000 0.781 0.000 2.832 0.000 6.722 0.000
as.factor(Age)4 3.162 0.000 11.201 0.000 10.398 0.000 8.611 0.000 7.783 0.000 4.920 0.000 13.046 0.000 0.675 0.000 4.344 0.000 15.097 0.000
as.factor(Age)5 3.419 0.000 20.840 0.000 15.000 0.000 15.925 0.000 12.863 0.000 6.687 0.000 22.036 0.000 0.526 0.000 6.014 0.000 24.808 0.000
as.factor(Age)6 2.993 0.000 31.353 0.000 18.690 0.000 33.679 0.000 22.156 0.000 5.920 0.000 27.963 0.000 0.260 0.000 7.811 0.000 30.108 0.000
Caucasian 0.970 0.000 1.152 0.000 0.765 0.000 6.466 0.000 1.369 0.000 1.317 0.000 1.218 0.000 1.266 0.000 0.867 0.000 0.598 0.000
Hispanic 1.172 0.000 0.899 0.000 0.667 0.000 1.255 0.000 0.840 0.000 0.674 0.000 0.704 0.000 0.871 0.000 1.034 0.192 1.031 0.022
Male 1.812 0.000 1.683 0.000 1.095 0.000 1.049 0.000 0.636 0.000 0.823 0.000 0.658 0.000 0.627 0.000 0.968 0.011 1.214 0.000
Married 1.062 0.000 0.865 0.000 0.711 0.000 1.090 0.000 0.954 0.000 0.644 0.000 0.854 0.000 0.674 0.000 0.831 0.000 0.941 0.000
Income.75K 1.101 0.000 0.768 0.000 0.592 0.000 1.185 0.000 0.957 0.000 0.530 0.000 0.811 0.000 0.881 0.000 0.760 0.000 0.707 0.000
College.Graduate 0.689 0.000 0.746 0.000 0.646 0.000 1.255 0.000 1.015 0.053 0.470 0.000 0.680 0.000 0.985 0.001 0.799 0.000 0.658 0.000
Employed.for.Wages 1.199 0.000 0.476 0.000 0.356 0.000 0.768 0.000 0.652 0.000 0.471 0.000 0.627 0.000 0.776 0.000 0.472 0.000 0.677 0.000
as.factor(Region)2 1.103 0.000 1.235 0.000 1.288 0.000 1.451 0.000 1.030 0.020 1.305 0.000 1.170 0.000 0.916 0.000 1.044 0.024 1.220 0.000
as.factor(Region)3 0.804 0.000 1.005 0.760 0.871 0.000 0.970 0.022 0.978 0.075 0.882 0.000 0.892 0.000 0.921 0.000 0.855 0.000 0.926 0.000
as.factor(Region)4 0.797 0.000 0.814 0.000 0.878 0.000 1.465 0.000 0.977 0.036 0.844 0.000 0.858 0.000 1.001 0.942 1.034 0.057 0.832 0.000
as.factor(Region)5 0.773 0.000 0.897 0.000 0.824 0.000 1.061 0.000 1.025 0.031 0.861 0.000 0.893 0.000 0.971 0.000 0.865 0.000 0.873 0.000
as.factor(Region)6 0.752 0.000 0.847 0.000 0.855 0.000 1.403 0.000 0.995 0.707 0.783 0.000 0.796 0.000 1.060 0.000 0.950 0.023 0.869 0.000
as.factor(Region)7 0.882 0.000 1.032 0.016 1.027 0.085 1.535 0.000 0.987 0.210 1.020 0.072 0.914 0.000 0.871 0.000 1.009 0.591 0.993 0.434
as.factor(Region)8 1.026 0.076 1.928 0.000 0.583 0.000 0.853 0.003 0.941 0.064 0.821 0.000 1.017 0.317 0.550 0.000 0.773 0.000 0.961 0.043
as.factor(Region)9 0.976 0.000 0.927 0.000 0.963 0.016 1.061 0.000 0.984 0.128 0.859 0.000 0.858 0.000 0.847 0.000 0.875 0.000 0.935 0.000
as.factor(Region)10 0.973 0.003 1.050 0.008 1.099 0.000 1.275 0.000 0.972 0.074 0.973 0.088 0.883 0.000 0.887 0.000 1.044 0.073 1.074 0.000
Veteran 1.257 0.000 1.335 0.000 1.267 0.000 1.319 0.000 1.490 0.000 1.379 0.000 1.276 0.000 0.989 0.141 1.155 0.000 1.107 0.000
as.factor(Year)2012 1.008 0.352 1.048 0.008 0.987 0.567 0.961 0.007 0.976 0.105 1.029 0.085 1.068 0.000 1.011 0.244 1.060 0.023 1.040 0.003
as.factor(Year)2013 1.005 0.572 0.956 0.011 0.998 0.917 0.999 0.938 1.005 0.724 1.048 0.003 1.022 0.023 0.940 0.000 1.046 0.087 1.040 0.004
as.factor(Year)2014 0.973 0.002 0.991 0.627 1.045 0.044 0.978 0.139 0.974 0.081 1.068 0.000 1.054 0.000 0.941 0.000 1.092 0.000 1.066 0.000
as.factor(Year)2015 0.954 0.000 0.904 0.000 1.028 0.201 1.000 0.993 1.003 0.865 1.017 0.291 0.987 0.192 0.969 0.001 1.053 0.040 1.055 0.000
as.factor(Year)2016 0.959 0.000 0.964 0.043 1.074 0.001 0.990 0.497 0.987 0.390 1.064 0.000 1.033 0.001 0.980 0.034 1.161 0.000 1.088 0.000
as.factor(Year)2017 0.979 0.024 0.889 0.000 1.085 0.000 0.989 0.490 1.017 0.293 1.072 0.000 0.971 0.004 1.041 0.000 1.240 0.000 1.101 0.000
as.factor(Year)2018 0.997 0.746 0.957 0.024 1.154 0.000 1.013 0.416 1.019 0.222 1.138 0.000 1.054 0.000 1.074 0.000 1.220 0.000 1.164 0.000
as.factor(Year)2019 1.001 0.934 0.848 0.000 1.155 0.000 1.035 0.025 1.057 0.000 1.093 0.000 0.999 0.896 1.181 0.000 1.223 0.000 1.117 0.000
as.factor(Year)2020 0.967 0.001 0.891 0.000 1.053 0.045 0.964 0.033 0.946 0.001 1.064 0.001 0.943 0.000 1.159 0.000 1.167 0.000 1.113 0.000
as.factor(Year)2021 0.991 0.332 0.842 0.000 1.118 0.000 0.998 0.881 1.032 0.052 1.092 0.000 1.014 0.175 1.328 0.000 1.210 0.000 1.163 0.000
unregister()

Pseudo R^2

pseudo=c(mymcfad(st1),mymcfad(st2),mymcfad(st3),mymcfad(st4),mymcfad(st5),mymcfad(st6),
          mymcfad(st7),mymcfad(st8),mymcfad(st9),mymcfad(st10))
names(pseudo)=a1

pseudo%>%kbl(col.names='R2')%>%kable_classic(html_font = "Cambria")
R2
Overweight.Obese 0.049
Heart.Disease 0.151
Stroke 0.122
Skin.Cancer 0.202
Cancer 0.125
COPD 0.109
Arthritis 0.183
Depression 0.051
Kidney.Disease 0.070
Diabetes 0.138