library(car)
## Loading required package: carData
library(stargazer)
##
## Please cite as:
## Hlavac, Marek (2018). stargazer: Well-Formatted Regression and Summary Statistics Tables.
## R package version 5.2.2. https://CRAN.R-project.org/package=stargazer
library(survey)
## Loading required package: grid
## Loading required package: Matrix
## Loading required package: survival
##
## Attaching package: 'survey'
## The following object is masked from 'package:graphics':
##
## dotchart
library(questionr)
library(foreign)
library(dplyr)
##
## Attaching package: 'dplyr'
## The following object is masked from 'package:car':
##
## recode
## The following objects are masked from 'package:stats':
##
## filter, lag
## The following objects are masked from 'package:base':
##
## intersect, setdiff, setequal, union
brfss2017=read.xport("~/Desktop/DataFolder/brfss.XPT ")
brfss2016=read.xport("~/Desktop/DataFolder/brfss2016.XPT ")
brfss2015=read.xport("~/Desktop/DataFolder/brfss2015.XPT ")
brfss2015part <- subset(brfss2015, IMONTH %in% c(7:12) )
#Marital Status; Are you? (marital status): 1 Married, 2 Divorced, 3 Widowed, 4 Seprarated, 5 Never married, 6 Partner, 9 Refuse
brfss2017$marital<-Recode(brfss2017$MARITAL,recodes="1='b-Married';2:4='c-D/W/S' ;5='a-Single';else=NA",as.factor=T)
#Sexual Orientation; Do you consider yourself to be? (sexual orientation): 1 Straight, 2 Gay, 3 Bisexual, 4 Other, 7 Don't know, 9 Refuse
brfss2017$sxorient<-Recode(brfss2017$SXORIENT,recodes="1='a-Straight';2='b-Gay';3='c-Bi';else=NA",as.factor=T)
#Income
brfss2017$income<-Recode(brfss2017$INCOME2,recodes="1:4='<$25k';5:7='$25k<$75k';8='>75k';else=NA",as.factor=T)
#Age
brfss2017$age<-cut(brfss2017$X_AGE80, breaks=c(0,24,39,59,79,99))
#Education
brfss2017$educ<-Recode(brfss2017$EDUCA, recodes="1:3='0lessHS';4:5='1HS/GED'; 6='2COLgrad';9=NA", as.factor=T)
#Health Insurance; Do you have health care coverage? 1 Yes, 2 No, 7 Dont know, 9 Refuse
brfss2017$insurance<-Recode(brfss2017$HLTHPLN1,recodes="1='Y';2='N';else=NA",as.factor=T)
#DR Checkup; Had a doctor checkup with the last...? 1 year, 2 years, 5 years, 5+ years
brfss2017$checkup<-Recode(brfss2017$CHECKUP1,recodes="1:2='1-2yrs';3:4='2+yrs';else=NA",as.factor=T)
#Interaction between marital status and sexual orientation
brfss2017$marXsxo<-interaction(brfss2017$marital,brfss2017$sxorient)
brfss2017$marXsxo<-as.factor(brfss2017$marXsxo)
#Homeowner; Do you own or rent your home? 1 Own, 2 Rent, 3 Other, 7 Don't know, 9 Refuse
brfss2017$ownhome<-Recode(brfss2017$RENTHOM1,recodes="1='Y';2:3='N';else=NA",as.factor=T)
#Smoking; Do you now smoke cigarettes every day, some days, or not at all? 1 Everyday, 2 Some days, 3 Not at all, 7 Don't know, 9 Refuse
brfss2017$smoke<-Recode(brfss2017$SMOKDAY2,recodes="1:2='Y';3='N';else=NA",as.factor=T)
#Was there a time in the past 12 months when you needed to see a doctor but could not because of cost? 1 Yes, 2 No, 7 Don't know, 9 Refuse
brfss2017$medcost<-Recode(brfss2017$MEDCOST,recodes="1='Y';2='N';else=NA",as.factor=T)
#During the past 30 days, on the days when you drank, about how many drinks did you drink on the average?
brfss2017$drinks<-Recode(brfss2017$AVEDRNK2,recodes="1:5='1-5';5:10='5-10';10:30='10-30';77=NA;99=NA;else=NA",as.factor=T)
#BMI; Four-categories of Body Mass Index (BMI): 1 Underweight, 2 Normal Weight, 3 Overweight, 4 Obese
brfss2017$bmi<-Recode(brfss2017$X_BMI5CAT,recodes="1='underwght';2='normalwght';3:4='over/obese';else=NA",as.factor=T)
#Not good mental health days: 1 (0 days), 2 (1-13 days), 3 (14-30 days), 9 Don't know
#Race/Ethnicity; 1 White, 2 Black, 3 Other, 4 Multiracial, 5 Hispanic, 9 Don't know
brfss2017$race<-Recode(brfss2017$X_RACEGR3, recodes="2='black'; 1='awhite'; 3:4='other';5='hispanic'; else=NA",as.factor=T)
brfss2017$race<-relevel(brfss2017$race, ref='awhite')
#Sex; 1 Male, 2 Female
brfss2017$sex<-Recode(brfss2017$SEX,recodes="1=1;2=0;9=NA;else=NA",as.factor=T)
brfss2017$medcost<-Recode(brfss2017$MEDCOST,recodes="1='Y';2='N';else=NA",as.factor=T)
brfss2017$menth<-Recode(brfss2017$MENTHLTH,recodes="88=0;77=NA;99=NA")
brfss2017$poorhlt<-Recode(brfss2017$POORHLTH,recodes="88=0;77=NA;99=NA")
#Marital Status; Are you? (marital status): 1 Married, 2 Divorced, 3 Widowed, 4 Seprarated, 5 Never married, 6 Partner, 9 Refuse
brfss2016$marital<-Recode(brfss2016$MARITAL,recodes="1='b-Married';2:4='c-D/W/S' ;5='a-Single';else=NA",as.factor=T)
#Sexual Orientation; Do you consider yourself to be? (sexual orientation): 1 Straight, 2 Gay, 3 Bisexual, 4 Other, 7 Don't know, 9 Refuse
brfss2016$sxorient<-Recode(brfss2016$SXORIENT,recodes="1='a-Straight';2='b-Gay';3='c-Bi';else=NA",as.factor=T)
#Income
brfss2016$income<-Recode(brfss2016$INCOME2,recodes="1:4='<$25k';5:7='$25k<$75k';8='>75k';else=NA",as.factor=T)
#Age
brfss2016$age<-cut(brfss2016$X_AGE80, breaks=c(0,24,39,59,79,99))
#Education
brfss2016$educ<-Recode(brfss2016$EDUCA, recodes="1:3='0lessHS';4:5='1HS/GED'; 6='2COLgrad';9=NA", as.factor=T)
#Health Insurance; Do you have health care coverage? 1 Yes, 2 No, 7 Dont know, 9 Refuse
brfss2016$insurance<-Recode(brfss2016$HLTHPLN1,recodes="1='Y';2='N';else=NA",as.factor=T)
#DR Checkup; Had a doctor checkup with the last...? 1 year, 2 years, 5 years, 5+ years
brfss2016$checkup<-Recode(brfss2016$CHECKUP1,recodes="1:2='1-2yrs';3:4='2+yrs';else=NA",as.factor=T)
#Interaction between marital status and sexual orientation
brfss2016$marXsxo<-interaction(brfss2016$marital,brfss2016$sxorient)
brfss2016$marXsxo<-as.factor(brfss2016$marXsxo)
#Homeowner; Do you own or rent your home? 1 Own, 2 Rent, 3 Other, 7 Don't know, 9 Refuse
brfss2016$ownhome<-Recode(brfss2016$RENTHOM1,recodes="1='Y';2:3='N';else=NA",as.factor=T)
#Smoking; Do you now smoke cigarettes every day, some days, or not at all? 1 Everyday, 2 Some days, 3 Not at all, 7 Don't know, 9 Refuse
brfss2016$smoke<-Recode(brfss2016$SMOKDAY2,recodes="1:2='Y';3='N';else=NA",as.factor=T)
#Was there a time in the past 12 months when you needed to see a doctor but could not because of cost? 1 Yes, 2 No, 7 Don't know, 9 Refuse
brfss2016$medcost<-Recode(brfss2016$MEDCOST,recodes="1='Y';2='N';else=NA",as.factor=T)
#During the past 30 days, on the days when you drank, about how many drinks did you drink on the average?
brfss2016$drinks<-Recode(brfss2016$AVEDRNK2,recodes="1:5='1-5';5:10='5-10';10:30='10-30';77=NA;99=NA;else=NA",as.factor=T)
#BMI; Four-categories of Body Mass Index (BMI): 1 Underweight, 2 Normal Weight, 3 Overweight, 4 Obese
brfss2016$bmi<-Recode(brfss2016$X_BMI5CAT,recodes="1='underwght';2='normalwght';3:4='over/obese';else=NA",as.factor=T)
#Race/Ethnicity; 1 White, 2 Black, 3 Other, 4 Multiracial, 5 Hispanic, 9 Don't know
brfss2016$race<-Recode(brfss2016$X_RACEGR3, recodes="2='black'; 1='awhite'; 3:4='other';5='hispanic'; else=NA",as.factor=T)
#Sex; 1 Male, 2 Female
brfss2016$sex<-Recode(brfss2016$SEX,recodes="1=1;2=0;9=NA;else=NA",as.factor=T)
#Mental Health; How many days during the past 30 days was your mental health not good? 1-30, 88 None, 77 Don't Know, 99 Refuse
brfss2016$menth<-Recode(brfss2016$MENTHLTH,recodes="88=0;77=NA;99=NA")
brfss2016$poorhlt<-Recode(brfss2016$POORHLTH,recodes="88=0;77=NA;99=NA")
#Marital Status; Are you? (marital status): 1 Married, 2 Divorced, 3 Widowed, 4 Seprarated, 5 Never married, 6 Partner, 9 Refuse
brfss2015part$marital<-Recode(brfss2015part$MARITAL,recodes="1='b-Married';2:4='c-D/W/S' ;5='a-Single';else=NA",as.factor=T)
#Sexual Orientation; Do you consider yourself to be? (sexual orientation): 1 Straight, 2 Gay, 3 Bisexual, 4 Other, 7 Don't know, 9 Refuse
brfss2015part$sxorient<-Recode(brfss2015part$SXORIENT,recodes="1='a-Straight';2='b-Gay';3='c-Bi';else=NA",as.factor=T)
#Income
brfss2015part$income<-Recode(brfss2015part$INCOME2,recodes="1:4='<$25k';5:7='$25k<$75k';8='>75k';else=NA",as.factor=T)
#Age
brfss2015part$age<-cut(brfss2015part$X_AGE80, breaks=c(0,24,39,59,79,99))
#Education
brfss2015part$educ<-Recode(brfss2015part$EDUCA, recodes="1:3='0lessHS';4:5='1HS/GED'; 6='2COLgrad';9=NA", as.factor=T)
#Health Insurance; Do you have health care coverage? 1 Yes, 2 No, 7 Dont know, 9 Refuse
brfss2015part$insurance<-Recode(brfss2015part$HLTHPLN1,recodes="1='Y';2='N';else=NA",as.factor=T)
#DR Checkup; Had a doctor checkup with the last...? 1 year, 2 years, 5 years, 5+ years
brfss2015part$checkup<-Recode(brfss2015part$CHECKUP1,recodes="1:2='1-2yrs';3:4='2+yrs';else=NA",as.factor=T)
#Interaction between marital status and sexual orientation
brfss2015part$marXsxo<-interaction(brfss2015part$marital,brfss2015part$sxorient)
brfss2015part$marXsxo<-as.factor(brfss2015part$marXsxo)
#Homeowner; Do you own or rent your home? 1 Own, 2 Rent, 3 Other, 7 Don't know, 9 Refuse
brfss2015part$ownhome<-Recode(brfss2015part$RENTHOM1,recodes="1='Y';2:3='N';else=NA",as.factor=T)
#Smoking; Do you now smoke cigarettes every day, some days, or not at all? 1 Everyday, 2 Some days, 3 Not at all, 7 Don't know, 9 Refuse
brfss2015part$smoke<-Recode(brfss2015part$SMOKDAY2,recodes="1:2='Y';3='N';else=NA",as.factor=T)
#Was there a time in the past 12 months when you needed to see a doctor but could not because of cost? 1 Yes, 2 No, 7 Don't know, 9 Refuse
brfss2015part$medcost<-Recode(brfss2015part$MEDCOST,recodes="1='Y';2='N';else=NA",as.factor=T)
#During the past 30 days, on the days when you drank, about how many drinks did you drink on the average?
brfss2015part$drinks<-Recode(brfss2015part$AVEDRNK2,recodes="1:5='1-5';5:10='5-10';10:30='10-30';77=NA;99=NA;else=NA",as.factor=T)
#BMI; Four-categories of Body Mass Index (BMI): 1 Underweight, 2 Normal Weight, 3 Overweight, 4 Obese
brfss2015part$bmi<-Recode(brfss2015part$X_BMI5CAT,recodes="1='underwght';2='normalwght';3:4='over/obese';else=NA",as.factor=T)
#Race/Ethnicity; 1 White, 2 Black, 3 Other, 4 Multiracial, 5 Hispanic, 9 Don't know
brfss2015part$race<-Recode(brfss2015part$X_RACEGR3, recodes="2='black'; 1='awhite'; 3:4='other';5='hispanic'; else=NA",as.factor=T)
brfss2015part$race<-relevel(brfss2015part$race, ref='awhite')
#Sex; 1 Male, 2 Female
brfss2015part$sex<-Recode(brfss2015part$SEX,recodes="1=1;2=0;9=NA;else=NA",as.factor=T)
#Mental Health; How many days during the past 30 days was your mental health not good? 1-30, 88 None, 77 Don't Know, 99 Refuse
brfss2015part$menth<-Recode(brfss2015part$MENTHLTH,recodes="88=0;77=NA;99=NA")
brfss2015part$poorhlt<-Recode(brfss2015part$POORHLTH,recodes="88=0;77=NA;99=NA")
brfss2017a<-brfss2017%>%
select(poorhlt,menth,medcost,income,marital,sxorient,age,educ,checkup,insurance,marXsxo,ownhome,smoke,drinks,bmi,race,sex,X_STRWT,X_LLCPWT)
brfss2016a<-brfss2016%>%
select(poorhlt,menth,medcost,income,marital,sxorient,age,educ,checkup,insurance,marXsxo,ownhome,smoke,drinks,bmi,race,sex,X_STRWT,X_LLCPWT)
brfss2015a<-brfss2015part%>%
select(poorhlt,menth,medcost,income,marital,sxorient,age,educ,checkup,insurance,marXsxo,ownhome,smoke,drinks,bmi,race,sex,X_STRWT,X_LLCPWT)
brfss151617<-rbind(brfss2017a,brfss2016a,brfss2015a)
brfss151617<-brfss151617%>%
filter(complete.cases(.))
options(survey.lonely.psu = "adjust")
#General Health by Marital Status
library(MASS)
##
## Attaching package: 'MASS'
## The following object is masked from 'package:dplyr':
##
## select
fit.pre<-glm.nb(menth~factor(marital),data=brfss151617,weights=X_LLCPWT/mean(X_LLCPWT,na.rm=T))
summary(fit.pre)
##
## Call:
## glm.nb(formula = menth ~ factor(marital), data = brfss151617,
## weights = X_LLCPWT/mean(X_LLCPWT, na.rm = T), init.theta = 0.4301993894,
## link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -10.3501 -0.8419 -0.3380 0.0819 5.9815
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.28633 0.01519 150.557 < 2e-16 ***
## factor(marital)b-Married -0.44071 0.01852 -23.802 < 2e-16 ***
## factor(marital)c-D/W/S -0.11856 0.02135 -5.553 2.81e-08 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(0.4302) family taken to be 1)
##
## Null deviance: 48582 on 43468 degrees of freedom
## Residual deviance: 47906 on 43466 degrees of freedom
## AIC: 256437
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 0.43020
## Std. Err.: 0.00336
##
## 2 x log-likelihood: -256429.35500
#General health by sexual orientation
fit.pre2<-glm.nb(menth~factor(sxorient),data=brfss151617,weights=X_LLCPWT/mean(X_LLCPWT,na.rm=T))
summary(fit.pre2)
##
## Call:
## glm.nb(formula = menth ~ factor(sxorient), data = brfss151617,
## weights = X_LLCPWT/mean(X_LLCPWT, na.rm = T), init.theta = 0.4245583654,
## link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -9.8873 -0.8468 -0.3407 0.0987 5.3572
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.022364 0.007816 258.761 < 2e-16 ***
## factor(sxorient)b-Gay 0.152057 0.046773 3.251 0.00115 **
## factor(sxorient)c-Bi 0.527441 0.040005 13.184 < 2e-16 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(0.4246) family taken to be 1)
##
## Null deviance: 48099 on 43468 degrees of freedom
## Residual deviance: 47889 on 43466 degrees of freedom
## AIC: 256897
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 0.42456
## Std. Err.: 0.00331
##
## 2 x log-likelihood: -256888.59900
#MODEL ONE
#General Health by Marital Status/Sexual orientation
fit1<-glm.nb(menth~factor(marXsxo),data=brfss151617,weights=X_LLCPWT/mean(X_LLCPWT,na.rm=T))
summary(fit1)
##
## Call:
## glm.nb(formula = menth ~ factor(marXsxo), data = brfss151617,
## weights = X_LLCPWT/mean(X_LLCPWT, na.rm = T), init.theta = 0.431799931,
## link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -10.3050 -0.8404 -0.3369 0.0817 5.9827
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.24905 0.01643 136.857 < 2e-16
## factor(marXsxo)b-Married.a-Straight -0.41480 0.01964 -21.123 < 2e-16
## factor(marXsxo)c-D/W/S.a-Straight -0.10040 0.02248 -4.467 7.95e-06
## factor(marXsxo)a-Single.b-Gay -0.00447 0.05996 -0.075 0.941
## factor(marXsxo)b-Married.b-Gay -0.37978 0.09506 -3.995 6.46e-05
## factor(marXsxo)c-D/W/S.b-Gay 0.05663 0.12756 0.444 0.657
## factor(marXsxo)a-Single.c-Bi 0.39719 0.05620 7.067 1.59e-12
## factor(marXsxo)b-Married.c-Bi 0.04172 0.07761 0.537 0.591
## factor(marXsxo)c-D/W/S.c-Bi 0.33665 0.08612 3.909 9.27e-05
##
## (Intercept) ***
## factor(marXsxo)b-Married.a-Straight ***
## factor(marXsxo)c-D/W/S.a-Straight ***
## factor(marXsxo)a-Single.b-Gay
## factor(marXsxo)b-Married.b-Gay ***
## factor(marXsxo)c-D/W/S.b-Gay
## factor(marXsxo)a-Single.c-Bi ***
## factor(marXsxo)b-Married.c-Bi
## factor(marXsxo)c-D/W/S.c-Bi ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(0.4318) family taken to be 1)
##
## Null deviance: 48718 on 43468 degrees of freedom
## Residual deviance: 47913 on 43460 degrees of freedom
## AIC: 256322
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 0.43180
## Std. Err.: 0.00338
##
## 2 x log-likelihood: -256302.17400
#MODEL TWO - includes biological demographic variables
#General Health by marital status/sexual orientation and sex, age, race
fit2<-glm.nb(menth~factor(marXsxo)+factor(sex)+factor(age)+factor(race),data=brfss151617,weights=X_LLCPWT/mean(X_LLCPWT,na.rm=T))
summary(fit2)
##
## Call:
## glm.nb(formula = menth ~ factor(marXsxo) + factor(sex) + factor(age) +
## factor(race), data = brfss151617, weights = X_LLCPWT/mean(X_LLCPWT,
## na.rm = T), init.theta = 0.4424241621, link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -10.7020 -0.8362 -0.3318 0.0967 7.6434
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.46311 0.03116 79.059 < 2e-16
## factor(marXsxo)b-Married.a-Straight -0.26866 0.02209 -12.163 < 2e-16
## factor(marXsxo)c-D/W/S.a-Straight 0.08583 0.02516 3.411 0.000647
## factor(marXsxo)a-Single.b-Gay 0.05981 0.05942 1.006 0.314200
## factor(marXsxo)b-Married.b-Gay -0.26584 0.09478 -2.805 0.005033
## factor(marXsxo)c-D/W/S.b-Gay 0.13207 0.12663 1.043 0.296991
## factor(marXsxo)a-Single.c-Bi 0.31585 0.05596 5.644 1.66e-08
## factor(marXsxo)b-Married.c-Bi 0.05219 0.07721 0.676 0.499074
## factor(marXsxo)c-D/W/S.c-Bi 0.35990 0.08560 4.204 2.62e-05
## factor(sex)1 -0.19237 0.01511 -12.733 < 2e-16
## factor(age)(24,39] -0.10388 0.03283 -3.164 0.001554
## factor(age)(39,59] -0.21692 0.03418 -6.347 2.19e-10
## factor(age)(59,79] -0.52785 0.03623 -14.568 < 2e-16
## factor(age)(79,99] -0.93335 0.05435 -17.173 < 2e-16
## factor(race)black 0.09922 0.02622 3.783 0.000155
## factor(race)hispanic -0.01406 0.02436 -0.577 0.563733
## factor(race)other 0.19896 0.03303 6.024 1.70e-09
##
## (Intercept) ***
## factor(marXsxo)b-Married.a-Straight ***
## factor(marXsxo)c-D/W/S.a-Straight ***
## factor(marXsxo)a-Single.b-Gay
## factor(marXsxo)b-Married.b-Gay **
## factor(marXsxo)c-D/W/S.b-Gay
## factor(marXsxo)a-Single.c-Bi ***
## factor(marXsxo)b-Married.c-Bi
## factor(marXsxo)c-D/W/S.c-Bi ***
## factor(sex)1 ***
## factor(age)(24,39] **
## factor(age)(39,59] ***
## factor(age)(59,79] ***
## factor(age)(79,99] ***
## factor(race)black ***
## factor(race)hispanic
## factor(race)other ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(0.4424) family taken to be 1)
##
## Null deviance: 49620 on 43468 degrees of freedom
## Residual deviance: 47944 on 43452 degrees of freedom
## AIC: 255495
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 0.44242
## Std. Err.: 0.00348
##
## 2 x log-likelihood: -255459.32400
####MODEL THREE - includes biological demographic variables and social demographic variables
#General Health by Marital Status plus sex, age, race, plus educ, income
fit3<-glm.nb(menth~factor(marXsxo)+factor(sex)+factor(age)+factor(race)+factor(educ)+factor(income),data=brfss151617,weights=X_LLCPWT/mean(X_LLCPWT,na.rm=T))
summary(fit3)
##
## Call:
## glm.nb(formula = menth ~ factor(marXsxo) + factor(sex) + factor(age) +
## factor(race) + factor(educ) + factor(income), data = brfss151617,
## weights = X_LLCPWT/mean(X_LLCPWT, na.rm = T), init.theta = 0.4513336335,
## link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -10.4626 -0.8288 -0.3211 0.1009 7.2788
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.754799 0.039759 69.287 < 2e-16
## factor(marXsxo)b-Married.a-Straight -0.148289 0.022629 -6.553 5.63e-11
## factor(marXsxo)c-D/W/S.a-Straight 0.051339 0.024970 2.056 0.0398
## factor(marXsxo)a-Single.b-Gay 0.054692 0.058979 0.927 0.3538
## factor(marXsxo)b-Married.b-Gay -0.103931 0.094351 -1.102 0.2707
## factor(marXsxo)c-D/W/S.b-Gay 0.123887 0.125567 0.987 0.3238
## factor(marXsxo)a-Single.c-Bi 0.270739 0.055490 4.879 1.07e-06
## factor(marXsxo)b-Married.c-Bi 0.152086 0.076602 1.985 0.0471
## factor(marXsxo)c-D/W/S.c-Bi 0.348798 0.084840 4.111 3.94e-05
## factor(sex)1 -0.197636 0.015089 -13.098 < 2e-16
## factor(age)(24,39] -0.075689 0.032634 -2.319 0.0204
## factor(age)(39,59] -0.197680 0.033985 -5.817 6.00e-09
## factor(age)(59,79] -0.511087 0.036063 -14.172 < 2e-16
## factor(age)(79,99] -0.899444 0.054052 -16.640 < 2e-16
## factor(race)black -0.003504 0.026450 -0.132 0.8946
## factor(race)hispanic -0.104143 0.024655 -4.224 2.40e-05
## factor(race)other 0.185662 0.032793 5.662 1.50e-08
## factor(educ)1HS/GED -0.061188 0.025534 -2.396 0.0166
## factor(educ)2COLgrad -0.248554 0.029763 -8.351 < 2e-16
## factor(income)>75k -0.433553 0.022886 -18.944 < 2e-16
## factor(income)$25k<$75k -0.273951 0.019799 -13.836 < 2e-16
##
## (Intercept) ***
## factor(marXsxo)b-Married.a-Straight ***
## factor(marXsxo)c-D/W/S.a-Straight *
## factor(marXsxo)a-Single.b-Gay
## factor(marXsxo)b-Married.b-Gay
## factor(marXsxo)c-D/W/S.b-Gay
## factor(marXsxo)a-Single.c-Bi ***
## factor(marXsxo)b-Married.c-Bi *
## factor(marXsxo)c-D/W/S.c-Bi ***
## factor(sex)1 ***
## factor(age)(24,39] *
## factor(age)(39,59] ***
## factor(age)(59,79] ***
## factor(age)(79,99] ***
## factor(race)black
## factor(race)hispanic ***
## factor(race)other ***
## factor(educ)1HS/GED *
## factor(educ)2COLgrad ***
## factor(income)>75k ***
## factor(income)$25k<$75k ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(0.4513) family taken to be 1)
##
## Null deviance: 50371 on 43468 degrees of freedom
## Residual deviance: 47978 on 43448 degrees of freedom
## AIC: 254825
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 0.45133
## Std. Err.: 0.00357
##
## 2 x log-likelihood: -254780.69100
#MODEL FOUR -includes biological and social demographic variables plus marriage behavior variables
fit4<-glm.nb(menth~factor(marXsxo)+factor(sex)+factor(age)+factor(race)+factor(educ)+factor(income)+factor(poorhlt)+factor(smoke)+factor(drinks)+factor(bmi),data=brfss151617,weights=X_LLCPWT/mean(X_LLCPWT,na.rm=T))
summary(fit4)
##
## Call:
## glm.nb(formula = menth ~ factor(marXsxo) + factor(sex) + factor(age) +
## factor(race) + factor(educ) + factor(income) + factor(poorhlt) +
## factor(smoke) + factor(drinks) + factor(bmi), data = brfss151617,
## weights = X_LLCPWT/mean(X_LLCPWT, na.rm = T), init.theta = 0.491000509,
## link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -10.5231 -0.8123 -0.2911 0.0917 8.3975
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.286293 0.042607 53.660 < 2e-16
## factor(marXsxo)b-Married.a-Straight -0.105426 0.022002 -4.792 1.65e-06
## factor(marXsxo)c-D/W/S.a-Straight 0.060978 0.024153 2.525 0.011582
## factor(marXsxo)a-Single.b-Gay 0.029694 0.057053 0.520 0.602744
## factor(marXsxo)b-Married.b-Gay -0.218160 0.091676 -2.380 0.017327
## factor(marXsxo)c-D/W/S.b-Gay 0.135938 0.121352 1.120 0.262631
## factor(marXsxo)a-Single.c-Bi 0.156220 0.053708 2.909 0.003629
## factor(marXsxo)b-Married.c-Bi 0.256888 0.073923 3.475 0.000511
## factor(marXsxo)c-D/W/S.c-Bi 0.233907 0.081930 2.855 0.004304
## factor(sex)1 -0.210366 0.014804 -14.210 < 2e-16
## factor(age)(24,39] -0.058218 0.031659 -1.839 0.065932
## factor(age)(39,59] -0.226947 0.033238 -6.828 8.62e-12
## factor(age)(59,79] -0.535630 0.035638 -15.030 < 2e-16
## factor(age)(79,99] -0.865873 0.053285 -16.250 < 2e-16
## factor(race)black -0.025466 0.025692 -0.991 0.321593
## factor(race)hispanic -0.059248 0.023922 -2.477 0.013258
## factor(race)other 0.096973 0.031753 3.054 0.002258
## factor(educ)1HS/GED -0.007745 0.024871 -0.311 0.755478
## factor(educ)2COLgrad -0.143824 0.029198 -4.926 8.40e-07
## factor(income)>75k -0.160869 0.022725 -7.079 1.45e-12
## factor(income)$25k<$75k -0.080393 0.019471 -4.129 3.64e-05
## factor(poorhlt)1 -0.600130 0.033265 -18.041 < 2e-16
## factor(poorhlt)2 -0.198541 0.031079 -6.388 1.68e-10
## factor(poorhlt)3 -0.176036 0.037388 -4.708 2.50e-06
## factor(poorhlt)4 -0.034316 0.050607 -0.678 0.497708
## factor(poorhlt)5 0.322737 0.036423 8.861 < 2e-16
## factor(poorhlt)6 0.130337 0.088744 1.469 0.141920
## factor(poorhlt)7 0.150574 0.047306 3.183 0.001457
## factor(poorhlt)8 0.259256 0.094209 2.752 0.005925
## factor(poorhlt)9 -0.125320 0.230937 -0.543 0.587364
## factor(poorhlt)10 0.618839 0.039553 15.646 < 2e-16
## factor(poorhlt)11 0.073328 0.297757 0.246 0.805474
## factor(poorhlt)12 0.576873 0.120838 4.774 1.81e-06
## factor(poorhlt)13 0.164909 0.227439 0.725 0.468409
## factor(poorhlt)14 0.416374 0.069106 6.025 1.69e-09
## factor(poorhlt)15 0.789450 0.039030 20.227 < 2e-16
## factor(poorhlt)16 0.338977 0.323074 1.049 0.294075
## factor(poorhlt)17 0.526212 0.460108 1.144 0.252760
## factor(poorhlt)18 1.106836 0.233063 4.749 2.04e-06
## factor(poorhlt)19 1.077869 1.004469 1.073 0.283238
## factor(poorhlt)20 0.917808 0.050130 18.308 < 2e-16
## factor(poorhlt)21 0.669491 0.144551 4.632 3.63e-06
## factor(poorhlt)22 1.493506 0.535424 2.789 0.005281
## factor(poorhlt)23 0.308316 0.346465 0.890 0.373526
## factor(poorhlt)24 1.151015 0.336590 3.420 0.000627
## factor(poorhlt)25 0.928939 0.086105 10.788 < 2e-16
## factor(poorhlt)26 1.209876 0.404561 2.991 0.002784
## factor(poorhlt)27 0.873146 0.302271 2.889 0.003869
## factor(poorhlt)28 0.861579 0.196472 4.385 1.16e-05
## factor(poorhlt)29 0.936987 0.231885 4.041 5.33e-05
## factor(poorhlt)30 0.883229 0.030627 28.838 < 2e-16
## factor(smoke)Y 0.171493 0.016127 10.634 < 2e-16
## factor(drinks)10-30 0.305892 0.047424 6.450 1.12e-10
## factor(drinks)5-10 0.181530 0.026791 6.776 1.24e-11
## factor(bmi)over/obese -0.055191 0.015853 -3.481 0.000499
## factor(bmi)underwght -0.013661 0.055939 -0.244 0.807062
##
## (Intercept) ***
## factor(marXsxo)b-Married.a-Straight ***
## factor(marXsxo)c-D/W/S.a-Straight *
## factor(marXsxo)a-Single.b-Gay
## factor(marXsxo)b-Married.b-Gay *
## factor(marXsxo)c-D/W/S.b-Gay
## factor(marXsxo)a-Single.c-Bi **
## factor(marXsxo)b-Married.c-Bi ***
## factor(marXsxo)c-D/W/S.c-Bi **
## factor(sex)1 ***
## factor(age)(24,39] .
## factor(age)(39,59] ***
## factor(age)(59,79] ***
## factor(age)(79,99] ***
## factor(race)black
## factor(race)hispanic *
## factor(race)other **
## factor(educ)1HS/GED
## factor(educ)2COLgrad ***
## factor(income)>75k ***
## factor(income)$25k<$75k ***
## factor(poorhlt)1 ***
## factor(poorhlt)2 ***
## factor(poorhlt)3 ***
## factor(poorhlt)4
## factor(poorhlt)5 ***
## factor(poorhlt)6
## factor(poorhlt)7 **
## factor(poorhlt)8 **
## factor(poorhlt)9
## factor(poorhlt)10 ***
## factor(poorhlt)11
## factor(poorhlt)12 ***
## factor(poorhlt)13
## factor(poorhlt)14 ***
## factor(poorhlt)15 ***
## factor(poorhlt)16
## factor(poorhlt)17
## factor(poorhlt)18 ***
## factor(poorhlt)19
## factor(poorhlt)20 ***
## factor(poorhlt)21 ***
## factor(poorhlt)22 **
## factor(poorhlt)23
## factor(poorhlt)24 ***
## factor(poorhlt)25 ***
## factor(poorhlt)26 **
## factor(poorhlt)27 **
## factor(poorhlt)28 ***
## factor(poorhlt)29 ***
## factor(poorhlt)30 ***
## factor(smoke)Y ***
## factor(drinks)10-30 ***
## factor(drinks)5-10 ***
## factor(bmi)over/obese ***
## factor(bmi)underwght
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(0.491) family taken to be 1)
##
## Null deviance: 53657 on 43468 degrees of freedom
## Residual deviance: 48150 on 43413 degrees of freedom
## AIC: 252093
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 0.49100
## Std. Err.: 0.00398
##
## 2 x log-likelihood: -251978.61700
#MODEL FIVE - includes biological and social demographic variables plus marriage behavior variables, and marriage financial variables
fit5<-glm.nb(menth~factor(marXsxo)+factor(sex)+factor(age)+factor(race)+factor(educ)+factor(income)+factor(poorhlt)+factor(smoke)+factor(drinks)+factor(bmi)+factor(medcost)+factor(insurance)+factor(checkup)+factor(ownhome),data=brfss151617,weights=X_LLCPWT/mean(X_LLCPWT,na.rm=T))
summary(fit5)
##
## Call:
## glm.nb(formula = menth ~ factor(marXsxo) + factor(sex) + factor(age) +
## factor(race) + factor(educ) + factor(income) + factor(poorhlt) +
## factor(smoke) + factor(drinks) + factor(bmi) + factor(medcost) +
## factor(insurance) + factor(checkup) + factor(ownhome), data = brfss151617,
## weights = X_LLCPWT/mean(X_LLCPWT, na.rm = T), init.theta = 0.4943662691,
## link = log)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -10.4428 -0.8115 -0.2898 0.0899 8.4331
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.124454 0.048832 43.505 < 2e-16
## factor(marXsxo)b-Married.a-Straight -0.084796 0.022388 -3.788 0.000152
## factor(marXsxo)c-D/W/S.a-Straight 0.067389 0.024187 2.786 0.005333
## factor(marXsxo)a-Single.b-Gay 0.033396 0.056883 0.587 0.557135
## factor(marXsxo)b-Married.b-Gay -0.187292 0.091411 -2.049 0.040472
## factor(marXsxo)c-D/W/S.b-Gay 0.154555 0.121050 1.277 0.201678
## factor(marXsxo)a-Single.c-Bi 0.138558 0.053580 2.586 0.009710
## factor(marXsxo)b-Married.c-Bi 0.286977 0.073790 3.889 0.000101
## factor(marXsxo)c-D/W/S.c-Bi 0.237906 0.081685 2.912 0.003585
## factor(sex)1 -0.208998 0.014825 -14.097 < 2e-16
## factor(age)(24,39] -0.058055 0.031614 -1.836 0.066306
## factor(age)(39,59] -0.201861 0.033514 -6.023 1.71e-09
## factor(age)(59,79] -0.476590 0.036246 -13.149 < 2e-16
## factor(age)(79,99] -0.783911 0.053804 -14.570 < 2e-16
## factor(race)black -0.039452 0.025962 -1.520 0.128608
## factor(race)hispanic -0.076227 0.024025 -3.173 0.001510
## factor(race)other 0.103902 0.031690 3.279 0.001043
## factor(educ)1HS/GED 0.005613 0.024936 0.225 0.821912
## factor(educ)2COLgrad -0.123799 0.029278 -4.228 2.35e-05
## factor(income)>75k -0.099678 0.023444 -4.252 2.12e-05
## factor(income)$25k<$75k -0.053353 0.019722 -2.705 0.006826
## factor(poorhlt)1 -0.610921 0.033201 -18.401 < 2e-16
## factor(poorhlt)2 -0.228918 0.031055 -7.371 1.69e-13
## factor(poorhlt)3 -0.182623 0.037308 -4.895 9.83e-07
## factor(poorhlt)4 -0.044716 0.050471 -0.886 0.375632
## factor(poorhlt)5 0.307089 0.036350 8.448 < 2e-16
## factor(poorhlt)6 0.081896 0.088584 0.925 0.355225
## factor(poorhlt)7 0.125799 0.047205 2.665 0.007699
## factor(poorhlt)8 0.242058 0.093961 2.576 0.009990
## factor(poorhlt)9 -0.227155 0.230231 -0.987 0.323820
## factor(poorhlt)10 0.594623 0.039495 15.056 < 2e-16
## factor(poorhlt)11 0.065424 0.296824 0.220 0.825548
## factor(poorhlt)12 0.536817 0.120574 4.452 8.50e-06
## factor(poorhlt)13 0.086117 0.227103 0.379 0.704541
## factor(poorhlt)14 0.401457 0.068935 5.824 5.75e-09
## factor(poorhlt)15 0.766732 0.038960 19.680 < 2e-16
## factor(poorhlt)16 0.231357 0.322063 0.718 0.472536
## factor(poorhlt)17 0.497274 0.458637 1.084 0.278257
## factor(poorhlt)18 1.039048 0.232372 4.471 7.77e-06
## factor(poorhlt)19 1.011430 1.001353 1.010 0.312465
## factor(poorhlt)20 0.890285 0.050063 17.783 < 2e-16
## factor(poorhlt)21 0.617570 0.144213 4.282 1.85e-05
## factor(poorhlt)22 1.413922 0.533767 2.649 0.008074
## factor(poorhlt)23 0.294111 0.345410 0.851 0.394499
## factor(poorhlt)24 1.096440 0.335576 3.267 0.001086
## factor(poorhlt)25 0.886857 0.085908 10.323 < 2e-16
## factor(poorhlt)26 1.193558 0.403356 2.959 0.003086
## factor(poorhlt)27 0.946841 0.301209 3.143 0.001670
## factor(poorhlt)28 0.838611 0.195879 4.281 1.86e-05
## factor(poorhlt)29 0.796323 0.231488 3.440 0.000582
## factor(poorhlt)30 0.868561 0.030592 28.392 < 2e-16
## factor(smoke)Y 0.154973 0.016182 9.577 < 2e-16
## factor(drinks)10-30 0.301873 0.047300 6.382 1.75e-10
## factor(drinks)5-10 0.186248 0.026761 6.960 3.41e-12
## factor(bmi)over/obese -0.052844 0.015835 -3.337 0.000846
## factor(bmi)underwght -0.023195 0.055792 -0.416 0.677602
## factor(medcost)Y 0.262209 0.020122 13.031 < 2e-16
## factor(insurance)Y 0.104963 0.025954 4.044 5.25e-05
## factor(checkup)2+yrs 0.064434 0.019342 3.331 0.000864
## factor(ownhome)Y -0.095543 0.018449 -5.179 2.23e-07
##
## (Intercept) ***
## factor(marXsxo)b-Married.a-Straight ***
## factor(marXsxo)c-D/W/S.a-Straight **
## factor(marXsxo)a-Single.b-Gay
## factor(marXsxo)b-Married.b-Gay *
## factor(marXsxo)c-D/W/S.b-Gay
## factor(marXsxo)a-Single.c-Bi **
## factor(marXsxo)b-Married.c-Bi ***
## factor(marXsxo)c-D/W/S.c-Bi **
## factor(sex)1 ***
## factor(age)(24,39] .
## factor(age)(39,59] ***
## factor(age)(59,79] ***
## factor(age)(79,99] ***
## factor(race)black
## factor(race)hispanic **
## factor(race)other **
## factor(educ)1HS/GED
## factor(educ)2COLgrad ***
## factor(income)>75k ***
## factor(income)$25k<$75k **
## factor(poorhlt)1 ***
## factor(poorhlt)2 ***
## factor(poorhlt)3 ***
## factor(poorhlt)4
## factor(poorhlt)5 ***
## factor(poorhlt)6
## factor(poorhlt)7 **
## factor(poorhlt)8 **
## factor(poorhlt)9
## factor(poorhlt)10 ***
## factor(poorhlt)11
## factor(poorhlt)12 ***
## factor(poorhlt)13
## factor(poorhlt)14 ***
## factor(poorhlt)15 ***
## factor(poorhlt)16
## factor(poorhlt)17
## factor(poorhlt)18 ***
## factor(poorhlt)19
## factor(poorhlt)20 ***
## factor(poorhlt)21 ***
## factor(poorhlt)22 **
## factor(poorhlt)23
## factor(poorhlt)24 **
## factor(poorhlt)25 ***
## factor(poorhlt)26 **
## factor(poorhlt)27 **
## factor(poorhlt)28 ***
## factor(poorhlt)29 ***
## factor(poorhlt)30 ***
## factor(smoke)Y ***
## factor(drinks)10-30 ***
## factor(drinks)5-10 ***
## factor(bmi)over/obese ***
## factor(bmi)underwght
## factor(medcost)Y ***
## factor(insurance)Y ***
## factor(checkup)2+yrs ***
## factor(ownhome)Y ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for Negative Binomial(0.4944) family taken to be 1)
##
## Null deviance: 53931 on 43468 degrees of freedom
## Residual deviance: 48163 on 43409 degrees of freedom
## AIC: 251874
##
## Number of Fisher Scoring iterations: 1
##
##
## Theta: 0.49437
## Std. Err.: 0.00402
##
## 2 x log-likelihood: -251752.16100
car::vif(fit5)
## GVIF Df GVIF^(1/(2*Df))
## factor(marXsxo) 1.927707 8 1.041874
## factor(sex) 1.085454 1 1.041851
## factor(age) 1.858036 4 1.080517
## factor(race) 1.243637 3 1.037008
## factor(educ) 1.307403 2 1.069307
## factor(income) 1.648598 2 1.133127
## factor(poorhlt) 1.212457 30 1.003216
## factor(smoke) 1.276555 1 1.129847
## factor(drinks) 1.118233 2 1.028331
## factor(bmi) 1.075272 2 1.018309
## factor(medcost) 1.225864 1 1.107187
## factor(insurance) 1.249850 1 1.117967
## factor(checkup) 1.144779 1 1.069943
## factor(ownhome) 1.462791 1 1.209459
stargazer(fit1,fit2,fit3,fit4,fit5,type = "html", style="demography",ci = T )
|
|
menth
|
|
Model 1
|
Model 2
|
Model 3
|
Model 4
|
Model 5
|
|
factor(marXsxo)b-Married.a-Straight
|
-0.415***
|
-0.269***
|
-0.148***
|
-0.105***
|
-0.085***
|
|
(-0.453, -0.376)
|
(-0.312, -0.225)
|
(-0.193, -0.104)
|
(-0.149, -0.062)
|
(-0.129, -0.041)
|
factor(marXsxo)c-D/W/S.a-Straight
|
-0.100***
|
0.086***
|
0.051*
|
0.061*
|
0.067**
|
|
(-0.144, -0.056)
|
(0.037, 0.135)
|
(0.002, 0.100)
|
(0.014, 0.108)
|
(0.020, 0.115)
|
factor(marXsxo)a-Single.b-Gay
|
-0.004
|
0.060
|
0.055
|
0.030
|
0.033
|
|
(-0.122, 0.113)
|
(-0.057, 0.176)
|
(-0.061, 0.170)
|
(-0.082, 0.142)
|
(-0.078, 0.145)
|
factor(marXsxo)b-Married.b-Gay
|
-0.380***
|
-0.266**
|
-0.104
|
-0.218*
|
-0.187*
|
|
(-0.566, -0.193)
|
(-0.452, -0.080)
|
(-0.289, 0.081)
|
(-0.398, -0.038)
|
(-0.366, -0.008)
|
factor(marXsxo)c-D/W/S.b-Gay
|
0.057
|
0.132
|
0.124
|
0.136
|
0.155
|
|
(-0.193, 0.307)
|
(-0.116, 0.380)
|
(-0.122, 0.370)
|
(-0.102, 0.374)
|
(-0.083, 0.392)
|
factor(marXsxo)a-Single.c-Bi
|
0.397***
|
0.316***
|
0.271***
|
0.156**
|
0.139**
|
|
(0.287, 0.507)
|
(0.206, 0.426)
|
(0.162, 0.379)
|
(0.051, 0.261)
|
(0.034, 0.244)
|
factor(marXsxo)b-Married.c-Bi
|
0.042
|
0.052
|
0.152*
|
0.257***
|
0.287***
|
|
(-0.110, 0.194)
|
(-0.099, 0.204)
|
(0.002, 0.302)
|
(0.112, 0.402)
|
(0.142, 0.432)
|
factor(marXsxo)c-D/W/S.c-Bi
|
0.337***
|
0.360***
|
0.349***
|
0.234**
|
0.238**
|
|
(0.168, 0.505)
|
(0.192, 0.528)
|
(0.183, 0.515)
|
(0.073, 0.394)
|
(0.078, 0.398)
|
factor(sex)1
|
|
-0.192***
|
-0.198***
|
-0.210***
|
-0.209***
|
|
|
(-0.222, -0.163)
|
(-0.227, -0.168)
|
(-0.239, -0.181)
|
(-0.238, -0.180)
|
factor(age)(24,39]
|
|
-0.104**
|
-0.076*
|
-0.058
|
-0.058
|
|
|
(-0.168, -0.040)
|
(-0.140, -0.012)
|
(-0.120, 0.004)
|
(-0.120, 0.004)
|
factor(age)(39,59]
|
|
-0.217***
|
-0.198***
|
-0.227***
|
-0.202***
|
|
|
(-0.284, -0.150)
|
(-0.264, -0.131)
|
(-0.292, -0.162)
|
(-0.268, -0.136)
|
factor(age)(59,79]
|
|
-0.528***
|
-0.511***
|
-0.536***
|
-0.477***
|
|
|
(-0.599, -0.457)
|
(-0.582, -0.440)
|
(-0.605, -0.466)
|
(-0.548, -0.406)
|
factor(age)(79,99]
|
|
-0.933***
|
-0.899***
|
-0.866***
|
-0.784***
|
|
|
(-1.040, -0.827)
|
(-1.005, -0.794)
|
(-0.970, -0.761)
|
(-0.889, -0.678)
|
factor(race)black
|
|
0.099***
|
-0.004
|
-0.025
|
-0.039
|
|
|
(0.048, 0.151)
|
(-0.055, 0.048)
|
(-0.076, 0.025)
|
(-0.090, 0.011)
|
factor(race)hispanic
|
|
-0.014
|
-0.104***
|
-0.059*
|
-0.076**
|
|
|
(-0.062, 0.034)
|
(-0.152, -0.056)
|
(-0.106, -0.012)
|
(-0.123, -0.029)
|
factor(race)other
|
|
0.199***
|
0.186***
|
0.097**
|
0.104**
|
|
|
(0.134, 0.264)
|
(0.121, 0.250)
|
(0.035, 0.159)
|
(0.042, 0.166)
|
factor(educ)1HS/GED
|
|
|
-0.061*
|
-0.008
|
0.006
|
|
|
|
(-0.111, -0.011)
|
(-0.056, 0.041)
|
(-0.043, 0.054)
|
factor(educ)2COLgrad
|
|
|
-0.249***
|
-0.144***
|
-0.124***
|
|
|
|
(-0.307, -0.190)
|
(-0.201, -0.087)
|
(-0.181, -0.066)
|
factor(income)> 75k
|
|
|
-0.434***
|
-0.161***
|
-0.100***
|
|
|
|
(-0.478, -0.389)
|
(-0.205, -0.116)
|
(-0.146, -0.054)
|
75k
|
|
|
-0.274***
|
-0.080***
|
-0.053**
|
|
|
|
(-0.313, -0.235)
|
(-0.119, -0.042)
|
(-0.092, -0.015)
|
factor(poorhlt)1
|
|
|
|
-0.600***
|
-0.611***
|
|
|
|
|
(-0.665, -0.535)
|
(-0.676, -0.546)
|
factor(poorhlt)2
|
|
|
|
-0.199***
|
-0.229***
|
|
|
|
|
(-0.259, -0.138)
|
(-0.290, -0.168)
|
factor(poorhlt)3
|
|
|
|
-0.176***
|
-0.183***
|
|
|
|
|
(-0.249, -0.103)
|
(-0.256, -0.110)
|
factor(poorhlt)4
|
|
|
|
-0.034
|
-0.045
|
|
|
|
|
(-0.134, 0.065)
|
(-0.144, 0.054)
|
factor(poorhlt)5
|
|
|
|
0.323***
|
0.307***
|
|
|
|
|
(0.251, 0.394)
|
(0.236, 0.378)
|
factor(poorhlt)6
|
|
|
|
0.130
|
0.082
|
|
|
|
|
(-0.044, 0.304)
|
(-0.092, 0.256)
|
factor(poorhlt)7
|
|
|
|
0.151**
|
0.126**
|
|
|
|
|
(0.058, 0.243)
|
(0.033, 0.218)
|
factor(poorhlt)8
|
|
|
|
0.259**
|
0.242**
|
|
|
|
|
(0.075, 0.444)
|
(0.058, 0.426)
|
factor(poorhlt)9
|
|
|
|
-0.125
|
-0.227
|
|
|
|
|
(-0.578, 0.327)
|
(-0.678, 0.224)
|
factor(poorhlt)10
|
|
|
|
0.619***
|
0.595***
|
|
|
|
|
(0.541, 0.696)
|
(0.517, 0.672)
|
factor(poorhlt)11
|
|
|
|
0.073
|
0.065
|
|
|
|
|
(-0.510, 0.657)
|
(-0.516, 0.647)
|
factor(poorhlt)12
|
|
|
|
0.577***
|
0.537***
|
|
|
|
|
(0.340, 0.814)
|
(0.300, 0.773)
|
factor(poorhlt)13
|
|
|
|
0.165
|
0.086
|
|
|
|
|
(-0.281, 0.611)
|
(-0.359, 0.531)
|
factor(poorhlt)14
|
|
|
|
0.416***
|
0.401***
|
|
|
|
|
(0.281, 0.552)
|
(0.266, 0.537)
|
factor(poorhlt)15
|
|
|
|
0.789***
|
0.767***
|
|
|
|
|
(0.713, 0.866)
|
(0.690, 0.843)
|
factor(poorhlt)16
|
|
|
|
0.339
|
0.231
|
|
|
|
|
(-0.294, 0.972)
|
(-0.400, 0.863)
|
factor(poorhlt)17
|
|
|
|
0.526
|
0.497
|
|
|
|
|
(-0.376, 1.428)
|
(-0.402, 1.396)
|
factor(poorhlt)18
|
|
|
|
1.107***
|
1.039***
|
|
|
|
|
(0.650, 1.564)
|
(0.584, 1.494)
|
factor(poorhlt)19
|
|
|
|
1.078
|
1.011
|
|
|
|
|
(-0.891, 3.047)
|
(-0.951, 2.974)
|
factor(poorhlt)20
|
|
|
|
0.918***
|
0.890***
|
|
|
|
|
(0.820, 1.016)
|
(0.792, 0.988)
|
factor(poorhlt)21
|
|
|
|
0.669***
|
0.618***
|
|
|
|
|
(0.386, 0.953)
|
(0.335, 0.900)
|
factor(poorhlt)22
|
|
|
|
1.494**
|
1.414**
|
|
|
|
|
(0.444, 2.543)
|
(0.368, 2.460)
|
factor(poorhlt)23
|
|
|
|
0.308
|
0.294
|
|
|
|
|
(-0.371, 0.987)
|
(-0.383, 0.971)
|
factor(poorhlt)24
|
|
|
|
1.151***
|
1.096**
|
|
|
|
|
(0.491, 1.811)
|
(0.439, 1.754)
|
factor(poorhlt)25
|
|
|
|
0.929***
|
0.887***
|
|
|
|
|
(0.760, 1.098)
|
(0.718, 1.055)
|
factor(poorhlt)26
|
|
|
|
1.210**
|
1.194**
|
|
|
|
|
(0.417, 2.003)
|
(0.403, 1.984)
|
factor(poorhlt)27
|
|
|
|
0.873**
|
0.947**
|
|
|
|
|
(0.281, 1.466)
|
(0.356, 1.537)
|
factor(poorhlt)28
|
|
|
|
0.862***
|
0.839***
|
|
|
|
|
(0.477, 1.247)
|
(0.455, 1.223)
|
factor(poorhlt)29
|
|
|
|
0.937***
|
0.796***
|
|
|
|
|
(0.483, 1.391)
|
(0.343, 1.250)
|
factor(poorhlt)30
|
|
|
|
0.883***
|
0.869***
|
|
|
|
|
(0.823, 0.943)
|
(0.809, 0.929)
|
factor(smoke)Y
|
|
|
|
0.171***
|
0.155***
|
|
|
|
|
(0.140, 0.203)
|
(0.123, 0.187)
|
factor(drinks)10-30
|
|
|
|
0.306***
|
0.302***
|
|
|
|
|
(0.213, 0.399)
|
(0.209, 0.395)
|
factor(drinks)5-10
|
|
|
|
0.182***
|
0.186***
|
|
|
|
|
(0.129, 0.234)
|
(0.134, 0.239)
|
factor(bmi)over/obese
|
|
|
|
-0.055***
|
-0.053***
|
|
|
|
|
(-0.086, -0.024)
|
(-0.084, -0.022)
|
factor(bmi)underwght
|
|
|
|
-0.014
|
-0.023
|
|
|
|
|
(-0.123, 0.096)
|
(-0.133, 0.086)
|
factor(medcost)Y
|
|
|
|
|
0.262***
|
|
|
|
|
|
(0.223, 0.302)
|
factor(insurance)Y
|
|
|
|
|
0.105***
|
|
|
|
|
|
(0.054, 0.156)
|
factor(checkup)2+yrs
|
|
|
|
|
0.064***
|
|
|
|
|
|
(0.027, 0.102)
|
factor(ownhome)Y
|
|
|
|
|
-0.096***
|
|
|
|
|
|
(-0.132, -0.059)
|
Constant
|
2.249***
|
2.463***
|
2.755***
|
2.286***
|
2.124***
|
|
(2.217, 2.281)
|
(2.402, 2.524)
|
(2.677, 2.833)
|
(2.203, 2.370)
|
(2.029, 2.220)
|
N
|
43,469
|
43,469
|
43,469
|
43,469
|
43,469
|
Log Likelihood
|
-128,152.100
|
-127,730.700
|
-127,391.300
|
-125,990.300
|
-125,877.100
|
theta
|
0.432*** (0.003)
|
0.442*** (0.003)
|
0.451*** (0.004)
|
0.491*** (0.004)
|
0.494*** (0.004)
|
AIC
|
256,322.200
|
255,495.300
|
254,824.700
|
252,092.600
|
251,874.200
|
|
p < .05; p < .01; p < .001
|
des<-svydesign(ids = ~1,strata=~X_STRWT,weights = ~X_LLCPWT,data = brfss151617)
fit7<-svyglm(menth~factor(marXsxo)+factor(sex)+factor(age)+factor(race)+factor(educ)+factor(income)+factor(poorhlt)+factor(smoke)+factor(drinks)+factor(bmi)+factor(medcost)+factor(insurance)+factor(checkup)+factor(ownhome),design=des,family=poisson)
summary(fit7)
##
## Call:
## svyglm(formula = menth ~ factor(marXsxo) + factor(sex) + factor(age) +
## factor(race) + factor(educ) + factor(income) + factor(poorhlt) +
## factor(smoke) + factor(drinks) + factor(bmi) + factor(medcost) +
## factor(insurance) + factor(checkup) + factor(ownhome), design = des,
## family = poisson)
##
## Survey design:
## svydesign(ids = ~1, strata = ~X_STRWT, weights = ~X_LLCPWT, data = brfss151617)
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.132013 0.074778 28.511 < 2e-16
## factor(marXsxo)b-Married.a-Straight -0.081879 0.036537 -2.241 0.025032
## factor(marXsxo)c-D/W/S.a-Straight 0.050427 0.033784 1.493 0.135536
## factor(marXsxo)a-Single.b-Gay 0.021351 0.088120 0.242 0.808557
## factor(marXsxo)b-Married.b-Gay -0.165561 0.143689 -1.152 0.249237
## factor(marXsxo)c-D/W/S.b-Gay 0.183992 0.117865 1.561 0.118522
## factor(marXsxo)a-Single.c-Bi 0.113542 0.060052 1.891 0.058667
## factor(marXsxo)b-Married.c-Bi 0.147462 0.138952 1.061 0.288586
## factor(marXsxo)c-D/W/S.c-Bi 0.156193 0.074452 2.098 0.035920
## factor(sex)1 -0.183905 0.022967 -8.007 1.20e-15
## factor(age)(24,39] -0.065917 0.044890 -1.468 0.142001
## factor(age)(39,59] -0.196991 0.048575 -4.055 5.01e-05
## factor(age)(59,79] -0.467977 0.054792 -8.541 < 2e-16
## factor(age)(79,99] -0.788769 0.096931 -8.137 4.15e-16
## factor(race)black -0.044809 0.039632 -1.131 0.258218
## factor(race)hispanic -0.058852 0.045015 -1.307 0.191094
## factor(race)other 0.094346 0.045214 2.087 0.036925
## factor(educ)1HS/GED 0.026134 0.039509 0.661 0.508325
## factor(educ)2COLgrad -0.087121 0.045813 -1.902 0.057222
## factor(income)>75k -0.113690 0.037494 -3.032 0.002429
## factor(income)$25k<$75k -0.063593 0.027751 -2.292 0.021934
## factor(poorhlt)1 -0.584245 0.091558 -6.381 1.78e-10
## factor(poorhlt)2 -0.195016 0.059011 -3.305 0.000951
## factor(poorhlt)3 -0.143247 0.081489 -1.758 0.078777
## factor(poorhlt)4 -0.005154 0.097178 -0.053 0.957699
## factor(poorhlt)5 0.298950 0.055352 5.401 6.67e-08
## factor(poorhlt)6 0.149853 0.116010 1.292 0.196462
## factor(poorhlt)7 0.159022 0.063306 2.512 0.012011
## factor(poorhlt)8 0.266353 0.094228 2.827 0.004705
## factor(poorhlt)9 -0.073366 0.230095 -0.319 0.749841
## factor(poorhlt)10 0.619655 0.039822 15.561 < 2e-16
## factor(poorhlt)11 -0.062541 0.313528 -0.199 0.841892
## factor(poorhlt)12 0.517078 0.125133 4.132 3.60e-05
## factor(poorhlt)13 0.240353 0.191068 1.258 0.208420
## factor(poorhlt)14 0.453239 0.081291 5.576 2.48e-08
## factor(poorhlt)15 0.772205 0.038711 19.948 < 2e-16
## factor(poorhlt)16 0.217755 0.177400 1.227 0.219650
## factor(poorhlt)17 0.260698 0.385150 0.677 0.498490
## factor(poorhlt)18 0.922755 0.150389 6.136 8.55e-10
## factor(poorhlt)19 0.990152 0.134787 7.346 2.08e-13
## factor(poorhlt)20 0.856427 0.046871 18.272 < 2e-16
## factor(poorhlt)21 0.661196 0.149780 4.414 1.02e-05
## factor(poorhlt)22 1.390957 0.084548 16.452 < 2e-16
## factor(poorhlt)23 0.369475 0.292205 1.264 0.206079
## factor(poorhlt)24 0.827409 0.392800 2.106 0.035172
## factor(poorhlt)25 0.880521 0.061065 14.419 < 2e-16
## factor(poorhlt)26 1.197586 0.107459 11.145 < 2e-16
## factor(poorhlt)27 0.976292 0.103169 9.463 < 2e-16
## factor(poorhlt)28 0.837801 0.161358 5.192 2.09e-07
## factor(poorhlt)29 0.857416 0.117795 7.279 3.43e-13
## factor(poorhlt)30 0.866822 0.034044 25.462 < 2e-16
## factor(smoke)Y 0.149284 0.025351 5.889 3.92e-09
## factor(drinks)10-30 0.266592 0.066438 4.013 6.01e-05
## factor(drinks)5-10 0.126453 0.037823 3.343 0.000829
## factor(bmi)over/obese -0.039895 0.024790 -1.609 0.107548
## factor(bmi)underwght -0.004000 0.071635 -0.056 0.955473
## factor(medcost)Y 0.214681 0.026698 8.041 9.13e-16
## factor(insurance)Y 0.066665 0.035526 1.877 0.060590
## factor(checkup)2+yrs 0.042277 0.028459 1.486 0.137411
## factor(ownhome)Y -0.075685 0.026522 -2.854 0.004323
##
## (Intercept) ***
## factor(marXsxo)b-Married.a-Straight *
## factor(marXsxo)c-D/W/S.a-Straight
## factor(marXsxo)a-Single.b-Gay
## factor(marXsxo)b-Married.b-Gay
## factor(marXsxo)c-D/W/S.b-Gay
## factor(marXsxo)a-Single.c-Bi .
## factor(marXsxo)b-Married.c-Bi
## factor(marXsxo)c-D/W/S.c-Bi *
## factor(sex)1 ***
## factor(age)(24,39]
## factor(age)(39,59] ***
## factor(age)(59,79] ***
## factor(age)(79,99] ***
## factor(race)black
## factor(race)hispanic
## factor(race)other *
## factor(educ)1HS/GED
## factor(educ)2COLgrad .
## factor(income)>75k **
## factor(income)$25k<$75k *
## factor(poorhlt)1 ***
## factor(poorhlt)2 ***
## factor(poorhlt)3 .
## factor(poorhlt)4
## factor(poorhlt)5 ***
## factor(poorhlt)6
## factor(poorhlt)7 *
## factor(poorhlt)8 **
## factor(poorhlt)9
## factor(poorhlt)10 ***
## factor(poorhlt)11
## factor(poorhlt)12 ***
## factor(poorhlt)13
## factor(poorhlt)14 ***
## factor(poorhlt)15 ***
## factor(poorhlt)16
## factor(poorhlt)17
## factor(poorhlt)18 ***
## factor(poorhlt)19 ***
## factor(poorhlt)20 ***
## factor(poorhlt)21 ***
## factor(poorhlt)22 ***
## factor(poorhlt)23
## factor(poorhlt)24 *
## factor(poorhlt)25 ***
## factor(poorhlt)26 ***
## factor(poorhlt)27 ***
## factor(poorhlt)28 ***
## factor(poorhlt)29 ***
## factor(poorhlt)30 ***
## factor(smoke)Y ***
## factor(drinks)10-30 ***
## factor(drinks)5-10 ***
## factor(bmi)over/obese
## factor(bmi)underwght
## factor(medcost)Y ***
## factor(insurance)Y .
## factor(checkup)2+yrs
## factor(ownhome)Y **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 11.384)
##
## Number of Fisher Scoring iterations: 6
fit8<-glm(menth~factor(marXsxo)+factor(sex)+factor(age)+factor(race)+factor(educ)+factor(income)+factor(poorhlt)+factor(smoke)+factor(drinks)+factor(bmi)+factor(medcost)+factor(insurance)+factor(checkup)+factor(ownhome),data=brfss151617,family=poisson)
summary(fit8)
##
## Call:
## glm(formula = menth ~ factor(marXsxo) + factor(sex) + factor(age) +
## factor(race) + factor(educ) + factor(income) + factor(poorhlt) +
## factor(smoke) + factor(drinks) + factor(bmi) + factor(medcost) +
## factor(insurance) + factor(checkup) + factor(ownhome), family = poisson,
## data = brfss151617)
##
## Deviance Residuals:
## Min 1Q Median 3Q Max
## -7.6250 -2.8902 -1.5777 0.8271 11.6790
##
## Coefficients:
## Estimate Std. Error z value Pr(>|z|)
## (Intercept) 2.184004 0.013754 158.790 < 2e-16
## factor(marXsxo)b-Married.a-Straight -0.089784 0.006006 -14.950 < 2e-16
## factor(marXsxo)c-D/W/S.a-Straight 0.037817 0.005910 6.399 1.57e-10
## factor(marXsxo)a-Single.b-Gay 0.048013 0.015461 3.105 0.001900
## factor(marXsxo)b-Married.b-Gay -0.008764 0.023962 -0.366 0.714558
## factor(marXsxo)c-D/W/S.b-Gay 0.257932 0.024098 10.703 < 2e-16
## factor(marXsxo)a-Single.c-Bi 0.079652 0.013797 5.773 7.78e-09
## factor(marXsxo)b-Married.c-Bi 0.093262 0.017512 5.326 1.01e-07
## factor(marXsxo)c-D/W/S.c-Bi 0.216051 0.015867 13.617 < 2e-16
## factor(sex)1 -0.198938 0.003811 -52.204 < 2e-16
## factor(age)(24,39] -0.071585 0.009361 -7.647 2.06e-14
## factor(age)(39,59] -0.211932 0.009646 -21.971 < 2e-16
## factor(age)(59,79] -0.480193 0.010216 -47.005 < 2e-16
## factor(age)(79,99] -0.845480 0.014651 -57.708 < 2e-16
## factor(race)black -0.049120 0.007267 -6.759 1.39e-11
## factor(race)hispanic -0.025331 0.007939 -3.191 0.001419
## factor(race)other 0.049447 0.006786 7.286 3.19e-13
## factor(educ)1HS/GED 0.006165 0.007138 0.864 0.387815
## factor(educ)2COLgrad -0.061330 0.008011 -7.655 1.93e-14
## factor(income)>75k -0.162914 0.006142 -26.525 < 2e-16
## factor(income)$25k<$75k -0.081905 0.004641 -17.648 < 2e-16
## factor(poorhlt)1 -0.699133 0.012880 -54.279 < 2e-16
## factor(poorhlt)2 -0.324424 0.009812 -33.063 < 2e-16
## factor(poorhlt)3 -0.216583 0.011570 -18.719 < 2e-16
## factor(poorhlt)4 -0.062001 0.014145 -4.383 1.17e-05
## factor(poorhlt)5 0.209231 0.009197 22.750 < 2e-16
## factor(poorhlt)6 0.056870 0.022163 2.566 0.010287
## factor(poorhlt)7 0.094761 0.013030 7.272 3.53e-13
## factor(poorhlt)8 0.203261 0.022274 9.125 < 2e-16
## factor(poorhlt)9 -0.142617 0.072682 -1.962 0.049738
## factor(poorhlt)10 0.535301 0.008434 63.472 < 2e-16
## factor(poorhlt)11 0.018591 0.079628 0.233 0.815393
## factor(poorhlt)12 0.553980 0.025753 21.512 < 2e-16
## factor(poorhlt)13 0.516074 0.058981 8.750 < 2e-16
## factor(poorhlt)14 0.440088 0.015503 28.387 < 2e-16
## factor(poorhlt)15 0.710059 0.007742 91.712 < 2e-16
## factor(poorhlt)16 0.368599 0.062285 5.918 3.26e-09
## factor(poorhlt)17 0.333177 0.071589 4.654 3.25e-06
## factor(poorhlt)18 0.848154 0.037855 22.406 < 2e-16
## factor(poorhlt)19 0.944871 0.106205 8.897 < 2e-16
## factor(poorhlt)20 0.873873 0.008802 99.278 < 2e-16
## factor(poorhlt)21 0.440800 0.031477 14.004 < 2e-16
## factor(poorhlt)22 1.132219 0.065202 17.365 < 2e-16
## factor(poorhlt)23 0.732227 0.069363 10.556 < 2e-16
## factor(poorhlt)24 0.894753 0.058344 15.336 < 2e-16
## factor(poorhlt)25 0.941103 0.014141 66.551 < 2e-16
## factor(poorhlt)26 1.121060 0.057467 19.508 < 2e-16
## factor(poorhlt)27 0.915611 0.049152 18.628 < 2e-16
## factor(poorhlt)28 0.936570 0.028227 33.180 < 2e-16
## factor(poorhlt)29 0.805883 0.042090 19.147 < 2e-16
## factor(poorhlt)30 0.808078 0.005702 141.718 < 2e-16
## factor(smoke)Y 0.164653 0.004109 40.074 < 2e-16
## factor(drinks)10-30 0.279207 0.011361 24.577 < 2e-16
## factor(drinks)5-10 0.125265 0.006864 18.249 < 2e-16
## factor(bmi)over/obese -0.012907 0.004000 -3.227 0.001251
## factor(bmi)underwght 0.055551 0.012683 4.380 1.19e-05
## factor(medcost)Y 0.239421 0.004767 50.227 < 2e-16
## factor(insurance)Y 0.024532 0.006614 3.709 0.000208
## factor(checkup)2+yrs 0.059892 0.005055 11.848 < 2e-16
## factor(ownhome)Y -0.086155 0.004461 -19.311 < 2e-16
##
## (Intercept) ***
## factor(marXsxo)b-Married.a-Straight ***
## factor(marXsxo)c-D/W/S.a-Straight ***
## factor(marXsxo)a-Single.b-Gay **
## factor(marXsxo)b-Married.b-Gay
## factor(marXsxo)c-D/W/S.b-Gay ***
## factor(marXsxo)a-Single.c-Bi ***
## factor(marXsxo)b-Married.c-Bi ***
## factor(marXsxo)c-D/W/S.c-Bi ***
## factor(sex)1 ***
## factor(age)(24,39] ***
## factor(age)(39,59] ***
## factor(age)(59,79] ***
## factor(age)(79,99] ***
## factor(race)black ***
## factor(race)hispanic **
## factor(race)other ***
## factor(educ)1HS/GED
## factor(educ)2COLgrad ***
## factor(income)>75k ***
## factor(income)$25k<$75k ***
## factor(poorhlt)1 ***
## factor(poorhlt)2 ***
## factor(poorhlt)3 ***
## factor(poorhlt)4 ***
## factor(poorhlt)5 ***
## factor(poorhlt)6 *
## factor(poorhlt)7 ***
## factor(poorhlt)8 ***
## factor(poorhlt)9 *
## factor(poorhlt)10 ***
## factor(poorhlt)11
## factor(poorhlt)12 ***
## factor(poorhlt)13 ***
## factor(poorhlt)14 ***
## factor(poorhlt)15 ***
## factor(poorhlt)16 ***
## factor(poorhlt)17 ***
## factor(poorhlt)18 ***
## factor(poorhlt)19 ***
## factor(poorhlt)20 ***
## factor(poorhlt)21 ***
## factor(poorhlt)22 ***
## factor(poorhlt)23 ***
## factor(poorhlt)24 ***
## factor(poorhlt)25 ***
## factor(poorhlt)26 ***
## factor(poorhlt)27 ***
## factor(poorhlt)28 ***
## factor(poorhlt)29 ***
## factor(poorhlt)30 ***
## factor(smoke)Y ***
## factor(drinks)10-30 ***
## factor(drinks)5-10 ***
## factor(bmi)over/obese **
## factor(bmi)underwght ***
## factor(medcost)Y ***
## factor(insurance)Y ***
## factor(checkup)2+yrs ***
## factor(ownhome)Y ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## (Dispersion parameter for poisson family taken to be 1)
##
## Null deviance: 528603 on 43468 degrees of freedom
## Residual deviance: 428001 on 43409 degrees of freedom
## AIC: 532549
##
## Number of Fisher Scoring iterations: 6
scale<-sqrt(fit8$deviance/fit8$df.residual)
scale
## [1] 3.140022
1-pchisq(fit2$deviance,df=fit2$df.residual)
## [1] 0
exp(coef(fit5))
## (Intercept) factor(marXsxo)b-Married.a-Straight
## 8.3683256 0.9186993
## factor(marXsxo)c-D/W/S.a-Straight factor(marXsxo)a-Single.b-Gay
## 1.0697117 1.0339600
## factor(marXsxo)b-Married.b-Gay factor(marXsxo)c-D/W/S.b-Gay
## 0.8292012 1.1671388
## factor(marXsxo)a-Single.c-Bi factor(marXsxo)b-Married.c-Bi
## 1.1486160 1.3323937
## factor(marXsxo)c-D/W/S.c-Bi factor(sex)1
## 1.2685901 0.8113965
## factor(age)(24,39] factor(age)(39,59]
## 0.9435981 0.8172088
## factor(age)(59,79] factor(age)(79,99]
## 0.6208972 0.4566165
## factor(race)black factor(race)hispanic
## 0.9613157 0.9266055
## factor(race)other factor(educ)1HS/GED
## 1.1094922 1.0056285
## factor(educ)2COLgrad factor(income)>75k
## 0.8835578 0.9051289
## factor(income)$25k<$75k factor(poorhlt)1
## 0.9480452 0.5428507
## factor(poorhlt)2 factor(poorhlt)3
## 0.7953938 0.8330819
## factor(poorhlt)4 factor(poorhlt)5
## 0.9562690 1.3594613
## factor(poorhlt)6 factor(poorhlt)7
## 1.0853426 1.1340547
## factor(poorhlt)8 factor(poorhlt)9
## 1.2738679 0.7967975
## factor(poorhlt)10 factor(poorhlt)11
## 1.8123482 1.0676120
## factor(poorhlt)12 factor(poorhlt)13
## 1.7105536 1.0899340
## factor(poorhlt)14 factor(poorhlt)15
## 1.4939998 2.1527198
## factor(poorhlt)16 factor(poorhlt)17
## 1.2603094 1.6442335
## factor(poorhlt)18 factor(poorhlt)19
## 2.8265251 2.7495304
## factor(poorhlt)20 factor(poorhlt)21
## 2.4358245 1.8544171
## factor(poorhlt)22 factor(poorhlt)23
## 4.1120496 1.3419334
## factor(poorhlt)24 factor(poorhlt)25
## 2.9934907 2.4274877
## factor(poorhlt)26 factor(poorhlt)27
## 3.2987977 2.5775541
## factor(poorhlt)28 factor(poorhlt)29
## 2.3131525 2.2173722
## factor(poorhlt)30 factor(smoke)Y
## 2.3834775 1.1676267
## factor(drinks)10-30 factor(drinks)5-10
## 1.3523894 1.2047207
## factor(bmi)over/obese factor(bmi)underwght
## 0.9485284 0.9770719
## factor(medcost)Y factor(insurance)Y
## 1.2997979 1.1106695
## factor(checkup)2+yrs factor(ownhome)Y
## 1.0665554 0.9088792
stargazer(fit7,type = "html", style="demography",ci = T )
|
|
menth
|
|
factor(marXsxo)b-Married.a-Straight
|
-0.082*
|
|
(-0.153, -0.010)
|
factor(marXsxo)c-D/W/S.a-Straight
|
0.050
|
|
(-0.016, 0.117)
|
factor(marXsxo)a-Single.b-Gay
|
0.021
|
|
(-0.151, 0.194)
|
factor(marXsxo)b-Married.b-Gay
|
-0.166
|
|
(-0.447, 0.116)
|
factor(marXsxo)c-D/W/S.b-Gay
|
0.184
|
|
(-0.047, 0.415)
|
factor(marXsxo)a-Single.c-Bi
|
0.114
|
|
(-0.004, 0.231)
|
factor(marXsxo)b-Married.c-Bi
|
0.147
|
|
(-0.125, 0.420)
|
factor(marXsxo)c-D/W/S.c-Bi
|
0.156*
|
|
(0.010, 0.302)
|
factor(sex)1
|
-0.184***
|
|
(-0.229, -0.139)
|
factor(age)(24,39]
|
-0.066
|
|
(-0.154, 0.022)
|
factor(age)(39,59]
|
-0.197***
|
|
(-0.292, -0.102)
|
factor(age)(59,79]
|
-0.468***
|
|
(-0.575, -0.361)
|
factor(age)(79,99]
|
-0.789***
|
|
(-0.979, -0.599)
|
factor(race)black
|
-0.045
|
|
(-0.122, 0.033)
|
factor(race)hispanic
|
-0.059
|
|
(-0.147, 0.029)
|
factor(race)other
|
0.094*
|
|
(0.006, 0.183)
|
factor(educ)1HS/GED
|
0.026
|
|
(-0.051, 0.104)
|
factor(educ)2COLgrad
|
-0.087
|
|
(-0.177, 0.003)
|
factor(income)> 75k
|
-0.114**
|
|
(-0.187, -0.040)
|
75k
|
-0.064*
|
|
(-0.118, -0.009)
|
factor(poorhlt)1
|
-0.584***
|
|
(-0.764, -0.405)
|
factor(poorhlt)2
|
-0.195***
|
|
(-0.311, -0.079)
|
factor(poorhlt)3
|
-0.143
|
|
(-0.303, 0.016)
|
factor(poorhlt)4
|
-0.005
|
|
(-0.196, 0.185)
|
factor(poorhlt)5
|
0.299***
|
|
(0.190, 0.407)
|
factor(poorhlt)6
|
0.150
|
|
(-0.078, 0.377)
|
factor(poorhlt)7
|
0.159*
|
|
(0.035, 0.283)
|
factor(poorhlt)8
|
0.266**
|
|
(0.082, 0.451)
|
factor(poorhlt)9
|
-0.073
|
|
(-0.524, 0.378)
|
factor(poorhlt)10
|
0.620***
|
|
(0.542, 0.698)
|
factor(poorhlt)11
|
-0.063
|
|
(-0.677, 0.552)
|
factor(poorhlt)12
|
0.517***
|
|
(0.272, 0.762)
|
factor(poorhlt)13
|
0.240
|
|
(-0.134, 0.615)
|
factor(poorhlt)14
|
0.453***
|
|
(0.294, 0.613)
|
factor(poorhlt)15
|
0.772***
|
|
(0.696, 0.848)
|
factor(poorhlt)16
|
0.218
|
|
(-0.130, 0.565)
|
factor(poorhlt)17
|
0.261
|
|
(-0.494, 1.016)
|
factor(poorhlt)18
|
0.923***
|
|
(0.628, 1.218)
|
factor(poorhlt)19
|
0.990***
|
|
(0.726, 1.254)
|
factor(poorhlt)20
|
0.856***
|
|
(0.765, 0.948)
|
factor(poorhlt)21
|
0.661***
|
|
(0.368, 0.955)
|
factor(poorhlt)22
|
1.391***
|
|
(1.225, 1.557)
|
factor(poorhlt)23
|
0.369
|
|
(-0.203, 0.942)
|
factor(poorhlt)24
|
0.827*
|
|
(0.058, 1.597)
|
factor(poorhlt)25
|
0.881***
|
|
(0.761, 1.000)
|
factor(poorhlt)26
|
1.198***
|
|
(0.987, 1.408)
|
factor(poorhlt)27
|
0.976***
|
|
(0.774, 1.178)
|
factor(poorhlt)28
|
0.838***
|
|
(0.522, 1.154)
|
factor(poorhlt)29
|
0.857***
|
|
(0.627, 1.088)
|
factor(poorhlt)30
|
0.867***
|
|
(0.800, 0.934)
|
factor(smoke)Y
|
0.149***
|
|
(0.100, 0.199)
|
factor(drinks)10-30
|
0.267***
|
|
(0.136, 0.397)
|
factor(drinks)5-10
|
0.126***
|
|
(0.052, 0.201)
|
factor(bmi)over/obese
|
-0.040
|
|
(-0.088, 0.009)
|
factor(bmi)underwght
|
-0.004
|
|
(-0.144, 0.136)
|
factor(medcost)Y
|
0.215***
|
|
(0.162, 0.267)
|
factor(insurance)Y
|
0.067
|
|
(-0.003, 0.136)
|
factor(checkup)2+yrs
|
0.042
|
|
(-0.014, 0.098)
|
factor(ownhome)Y
|
-0.076**
|
|
(-0.128, -0.024)
|
Constant
|
2.132***
|
|
(1.985, 2.279)
|
N
|
43,469
|
Log Likelihood
|
-270,597.100
|
AIC
|
541,314.100
|
|
p < .05; p < .01; p < .001
|
stargazer(fit8,type = "html", style="demography",ci = T )
|
|
menth
|
|
factor(marXsxo)b-Married.a-Straight
|
-0.090***
|
|
(-0.102, -0.078)
|
factor(marXsxo)c-D/W/S.a-Straight
|
0.038***
|
|
(0.026, 0.049)
|
factor(marXsxo)a-Single.b-Gay
|
0.048**
|
|
(0.018, 0.078)
|
factor(marXsxo)b-Married.b-Gay
|
-0.009
|
|
(-0.056, 0.038)
|
factor(marXsxo)c-D/W/S.b-Gay
|
0.258***
|
|
(0.211, 0.305)
|
factor(marXsxo)a-Single.c-Bi
|
0.080***
|
|
(0.053, 0.107)
|
factor(marXsxo)b-Married.c-Bi
|
0.093***
|
|
(0.059, 0.128)
|
factor(marXsxo)c-D/W/S.c-Bi
|
0.216***
|
|
(0.185, 0.247)
|
factor(sex)1
|
-0.199***
|
|
(-0.206, -0.191)
|
factor(age)(24,39]
|
-0.072***
|
|
(-0.090, -0.053)
|
factor(age)(39,59]
|
-0.212***
|
|
(-0.231, -0.193)
|
factor(age)(59,79]
|
-0.480***
|
|
(-0.500, -0.460)
|
factor(age)(79,99]
|
-0.845***
|
|
(-0.874, -0.817)
|
factor(race)black
|
-0.049***
|
|
(-0.063, -0.035)
|
factor(race)hispanic
|
-0.025**
|
|
(-0.041, -0.010)
|
factor(race)other
|
0.049***
|
|
(0.036, 0.063)
|
factor(educ)1HS/GED
|
0.006
|
|
(-0.008, 0.020)
|
factor(educ)2COLgrad
|
-0.061***
|
|
(-0.077, -0.046)
|
factor(income)> 75k
|
-0.163***
|
|
(-0.175, -0.151)
|
75k
|
-0.082***
|
|
(-0.091, -0.073)
|
factor(poorhlt)1
|
-0.699***
|
|
(-0.724, -0.674)
|
factor(poorhlt)2
|
-0.324***
|
|
(-0.344, -0.305)
|
factor(poorhlt)3
|
-0.217***
|
|
(-0.239, -0.194)
|
factor(poorhlt)4
|
-0.062***
|
|
(-0.090, -0.034)
|
factor(poorhlt)5
|
0.209***
|
|
(0.191, 0.227)
|
factor(poorhlt)6
|
0.057*
|
|
(0.013, 0.100)
|
factor(poorhlt)7
|
0.095***
|
|
(0.069, 0.120)
|
factor(poorhlt)8
|
0.203***
|
|
(0.160, 0.247)
|
factor(poorhlt)9
|
-0.143*
|
|
(-0.285, -0.0002)
|
factor(poorhlt)10
|
0.535***
|
|
(0.519, 0.552)
|
factor(poorhlt)11
|
0.019
|
|
(-0.137, 0.175)
|
factor(poorhlt)12
|
0.554***
|
|
(0.504, 0.604)
|
factor(poorhlt)13
|
0.516***
|
|
(0.400, 0.632)
|
factor(poorhlt)14
|
0.440***
|
|
(0.410, 0.470)
|
factor(poorhlt)15
|
0.710***
|
|
(0.695, 0.725)
|
factor(poorhlt)16
|
0.369***
|
|
(0.247, 0.491)
|
factor(poorhlt)17
|
0.333***
|
|
(0.193, 0.473)
|
factor(poorhlt)18
|
0.848***
|
|
(0.774, 0.922)
|
factor(poorhlt)19
|
0.945***
|
|
(0.737, 1.153)
|
factor(poorhlt)20
|
0.874***
|
|
(0.857, 0.891)
|
factor(poorhlt)21
|
0.441***
|
|
(0.379, 0.502)
|
factor(poorhlt)22
|
1.132***
|
|
(1.004, 1.260)
|
factor(poorhlt)23
|
0.732***
|
|
(0.596, 0.868)
|
factor(poorhlt)24
|
0.895***
|
|
(0.780, 1.009)
|
factor(poorhlt)25
|
0.941***
|
|
(0.913, 0.969)
|
factor(poorhlt)26
|
1.121***
|
|
(1.008, 1.234)
|
factor(poorhlt)27
|
0.916***
|
|
(0.819, 1.012)
|
factor(poorhlt)28
|
0.937***
|
|
(0.881, 0.992)
|
factor(poorhlt)29
|
0.806***
|
|
(0.723, 0.888)
|
factor(poorhlt)30
|
0.808***
|
|
(0.797, 0.819)
|
factor(smoke)Y
|
0.165***
|
|
(0.157, 0.173)
|
factor(drinks)10-30
|
0.279***
|
|
(0.257, 0.301)
|
factor(drinks)5-10
|
0.125***
|
|
(0.112, 0.139)
|
factor(bmi)over/obese
|
-0.013**
|
|
(-0.021, -0.005)
|
factor(bmi)underwght
|
0.056***
|
|
(0.031, 0.080)
|
factor(medcost)Y
|
0.239***
|
|
(0.230, 0.249)
|
factor(insurance)Y
|
0.025***
|
|
(0.012, 0.037)
|
factor(checkup)2+yrs
|
0.060***
|
|
(0.050, 0.070)
|
factor(ownhome)Y
|
-0.086***
|
|
(-0.095, -0.077)
|
Constant
|
2.184***
|
|
(2.157, 2.211)
|
N
|
43,469
|
Log Likelihood
|
-266,214.500
|
AIC
|
532,549.000
|
|
p < .05; p < .01; p < .001
|
summary(brfss151617$menth)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 0.000 0.000 2.000 7.017 10.000 30.000
summary(brfss151617$marXsxo)
## a-Single.a-Straight b-Married.a-Straight c-D/W/S.a-Straight
## 6241 21422 13598
## a-Single.b-Gay b-Married.b-Gay c-D/W/S.b-Gay
## 516 284 171
## a-Single.c-Bi b-Married.c-Bi c-D/W/S.c-Bi
## 480 403 354
table(brfss151617$marXsxo,brfss151617$menth)
##
## 0 1 2 3 4 5 6 7 8 9
## a-Single.a-Straight 1504 351 597 398 229 503 64 271 50 6
## b-Married.a-Straight 8761 1515 2229 1223 626 1672 160 462 100 15
## c-D/W/S.a-Straight 4824 749 1193 731 380 951 124 345 69 11
## a-Single.b-Gay 116 33 44 36 11 60 8 26 5 0
## b-Married.b-Gay 97 22 33 11 5 23 4 13 1 1
## c-D/W/S.b-Gay 42 5 15 7 8 18 2 4 2 0
## a-Single.c-Bi 58 23 41 23 10 36 7 22 4 0
## b-Married.c-Bi 97 20 40 24 12 47 2 13 0 0
## c-D/W/S.c-Bi 65 15 30 21 5 31 0 17 3 0
##
## 10 11 12 13 14 15 16 17 18 19
## a-Single.a-Straight 420 4 35 6 82 407 10 3 10 1
## b-Married.a-Straight 1039 5 66 8 152 881 8 11 16 2
## c-D/W/S.a-Straight 764 2 49 9 136 714 15 10 12 1
## a-Single.b-Gay 31 0 4 0 7 32 1 1 1 0
## b-Married.b-Gay 17 0 0 0 6 17 1 1 0 0
## c-D/W/S.b-Gay 5 0 4 0 3 11 0 0 0 0
## a-Single.c-Bi 33 0 5 0 13 59 2 1 0 0
## b-Married.c-Bi 33 0 2 0 5 24 1 0 0 0
## c-D/W/S.c-Bi 19 0 2 1 4 26 0 0 0 0
##
## 20 21 22 23 24 25 26 27 28 29
## a-Single.a-Straight 290 18 8 4 9 100 5 6 23 14
## b-Married.a-Straight 512 27 10 2 4 146 5 9 58 36
## c-D/W/S.a-Straight 488 23 14 5 4 167 3 11 44 25
## a-Single.b-Gay 23 0 2 0 1 5 0 0 1 0
## b-Married.b-Gay 4 0 0 0 0 3 0 0 1 1
## c-D/W/S.b-Gay 5 2 1 0 0 3 0 1 0 0
## a-Single.c-Bi 34 0 2 0 1 8 1 2 9 3
## b-Married.c-Bi 27 1 0 0 1 5 0 0 1 1
## c-D/W/S.c-Bi 13 2 0 1 0 8 1 0 3 2
##
## 30
## a-Single.a-Straight 813
## b-Married.a-Straight 1662
## c-D/W/S.a-Straight 1725
## a-Single.b-Gay 68
## b-Married.b-Gay 23
## c-D/W/S.b-Gay 33
## a-Single.c-Bi 83
## b-Married.c-Bi 47
## c-D/W/S.c-Bi 85
svyby(~menth,~marXsxo+race+educ,des,svymean,na.rm=T)
## marXsxo race
## a-Single.a-Straight.awhite.0lessHS a-Single.a-Straight awhite
## b-Married.a-Straight.awhite.0lessHS b-Married.a-Straight awhite
## c-D/W/S.a-Straight.awhite.0lessHS c-D/W/S.a-Straight awhite
## a-Single.b-Gay.awhite.0lessHS a-Single.b-Gay awhite
## b-Married.b-Gay.awhite.0lessHS b-Married.b-Gay awhite
## c-D/W/S.b-Gay.awhite.0lessHS c-D/W/S.b-Gay awhite
## a-Single.c-Bi.awhite.0lessHS a-Single.c-Bi awhite
## b-Married.c-Bi.awhite.0lessHS b-Married.c-Bi awhite
## c-D/W/S.c-Bi.awhite.0lessHS c-D/W/S.c-Bi awhite
## a-Single.a-Straight.black.0lessHS a-Single.a-Straight black
## b-Married.a-Straight.black.0lessHS b-Married.a-Straight black
## c-D/W/S.a-Straight.black.0lessHS c-D/W/S.a-Straight black
## a-Single.b-Gay.black.0lessHS a-Single.b-Gay black
## b-Married.b-Gay.black.0lessHS b-Married.b-Gay black
## c-D/W/S.b-Gay.black.0lessHS c-D/W/S.b-Gay black
## a-Single.c-Bi.black.0lessHS a-Single.c-Bi black
## b-Married.c-Bi.black.0lessHS b-Married.c-Bi black
## c-D/W/S.c-Bi.black.0lessHS c-D/W/S.c-Bi black
## a-Single.a-Straight.hispanic.0lessHS a-Single.a-Straight hispanic
## b-Married.a-Straight.hispanic.0lessHS b-Married.a-Straight hispanic
## c-D/W/S.a-Straight.hispanic.0lessHS c-D/W/S.a-Straight hispanic
## a-Single.b-Gay.hispanic.0lessHS a-Single.b-Gay hispanic
## c-D/W/S.b-Gay.hispanic.0lessHS c-D/W/S.b-Gay hispanic
## a-Single.c-Bi.hispanic.0lessHS a-Single.c-Bi hispanic
## b-Married.c-Bi.hispanic.0lessHS b-Married.c-Bi hispanic
## c-D/W/S.c-Bi.hispanic.0lessHS c-D/W/S.c-Bi hispanic
## a-Single.a-Straight.other.0lessHS a-Single.a-Straight other
## b-Married.a-Straight.other.0lessHS b-Married.a-Straight other
## c-D/W/S.a-Straight.other.0lessHS c-D/W/S.a-Straight other
## a-Single.b-Gay.other.0lessHS a-Single.b-Gay other
## b-Married.b-Gay.other.0lessHS b-Married.b-Gay other
## a-Single.c-Bi.other.0lessHS a-Single.c-Bi other
## b-Married.c-Bi.other.0lessHS b-Married.c-Bi other
## c-D/W/S.c-Bi.other.0lessHS c-D/W/S.c-Bi other
## a-Single.a-Straight.awhite.1HS/GED a-Single.a-Straight awhite
## b-Married.a-Straight.awhite.1HS/GED b-Married.a-Straight awhite
## c-D/W/S.a-Straight.awhite.1HS/GED c-D/W/S.a-Straight awhite
## a-Single.b-Gay.awhite.1HS/GED a-Single.b-Gay awhite
## b-Married.b-Gay.awhite.1HS/GED b-Married.b-Gay awhite
## c-D/W/S.b-Gay.awhite.1HS/GED c-D/W/S.b-Gay awhite
## a-Single.c-Bi.awhite.1HS/GED a-Single.c-Bi awhite
## b-Married.c-Bi.awhite.1HS/GED b-Married.c-Bi awhite
## c-D/W/S.c-Bi.awhite.1HS/GED c-D/W/S.c-Bi awhite
## a-Single.a-Straight.black.1HS/GED a-Single.a-Straight black
## b-Married.a-Straight.black.1HS/GED b-Married.a-Straight black
## c-D/W/S.a-Straight.black.1HS/GED c-D/W/S.a-Straight black
## a-Single.b-Gay.black.1HS/GED a-Single.b-Gay black
## b-Married.b-Gay.black.1HS/GED b-Married.b-Gay black
## c-D/W/S.b-Gay.black.1HS/GED c-D/W/S.b-Gay black
## a-Single.c-Bi.black.1HS/GED a-Single.c-Bi black
## b-Married.c-Bi.black.1HS/GED b-Married.c-Bi black
## c-D/W/S.c-Bi.black.1HS/GED c-D/W/S.c-Bi black
## a-Single.a-Straight.hispanic.1HS/GED a-Single.a-Straight hispanic
## b-Married.a-Straight.hispanic.1HS/GED b-Married.a-Straight hispanic
## c-D/W/S.a-Straight.hispanic.1HS/GED c-D/W/S.a-Straight hispanic
## a-Single.b-Gay.hispanic.1HS/GED a-Single.b-Gay hispanic
## b-Married.b-Gay.hispanic.1HS/GED b-Married.b-Gay hispanic
## c-D/W/S.b-Gay.hispanic.1HS/GED c-D/W/S.b-Gay hispanic
## a-Single.c-Bi.hispanic.1HS/GED a-Single.c-Bi hispanic
## b-Married.c-Bi.hispanic.1HS/GED b-Married.c-Bi hispanic
## c-D/W/S.c-Bi.hispanic.1HS/GED c-D/W/S.c-Bi hispanic
## a-Single.a-Straight.other.1HS/GED a-Single.a-Straight other
## b-Married.a-Straight.other.1HS/GED b-Married.a-Straight other
## c-D/W/S.a-Straight.other.1HS/GED c-D/W/S.a-Straight other
## a-Single.b-Gay.other.1HS/GED a-Single.b-Gay other
## b-Married.b-Gay.other.1HS/GED b-Married.b-Gay other
## c-D/W/S.b-Gay.other.1HS/GED c-D/W/S.b-Gay other
## a-Single.c-Bi.other.1HS/GED a-Single.c-Bi other
## b-Married.c-Bi.other.1HS/GED b-Married.c-Bi other
## c-D/W/S.c-Bi.other.1HS/GED c-D/W/S.c-Bi other
## a-Single.a-Straight.awhite.2COLgrad a-Single.a-Straight awhite
## b-Married.a-Straight.awhite.2COLgrad b-Married.a-Straight awhite
## c-D/W/S.a-Straight.awhite.2COLgrad c-D/W/S.a-Straight awhite
## a-Single.b-Gay.awhite.2COLgrad a-Single.b-Gay awhite
## b-Married.b-Gay.awhite.2COLgrad b-Married.b-Gay awhite
## c-D/W/S.b-Gay.awhite.2COLgrad c-D/W/S.b-Gay awhite
## a-Single.c-Bi.awhite.2COLgrad a-Single.c-Bi awhite
## b-Married.c-Bi.awhite.2COLgrad b-Married.c-Bi awhite
## c-D/W/S.c-Bi.awhite.2COLgrad c-D/W/S.c-Bi awhite
## a-Single.a-Straight.black.2COLgrad a-Single.a-Straight black
## b-Married.a-Straight.black.2COLgrad b-Married.a-Straight black
## c-D/W/S.a-Straight.black.2COLgrad c-D/W/S.a-Straight black
## a-Single.b-Gay.black.2COLgrad a-Single.b-Gay black
## b-Married.b-Gay.black.2COLgrad b-Married.b-Gay black
## c-D/W/S.b-Gay.black.2COLgrad c-D/W/S.b-Gay black
## a-Single.c-Bi.black.2COLgrad a-Single.c-Bi black
## b-Married.c-Bi.black.2COLgrad b-Married.c-Bi black
## c-D/W/S.c-Bi.black.2COLgrad c-D/W/S.c-Bi black
## a-Single.a-Straight.hispanic.2COLgrad a-Single.a-Straight hispanic
## b-Married.a-Straight.hispanic.2COLgrad b-Married.a-Straight hispanic
## c-D/W/S.a-Straight.hispanic.2COLgrad c-D/W/S.a-Straight hispanic
## a-Single.b-Gay.hispanic.2COLgrad a-Single.b-Gay hispanic
## b-Married.b-Gay.hispanic.2COLgrad b-Married.b-Gay hispanic
## c-D/W/S.b-Gay.hispanic.2COLgrad c-D/W/S.b-Gay hispanic
## a-Single.c-Bi.hispanic.2COLgrad a-Single.c-Bi hispanic
## b-Married.c-Bi.hispanic.2COLgrad b-Married.c-Bi hispanic
## c-D/W/S.c-Bi.hispanic.2COLgrad c-D/W/S.c-Bi hispanic
## a-Single.a-Straight.other.2COLgrad a-Single.a-Straight other
## b-Married.a-Straight.other.2COLgrad b-Married.a-Straight other
## c-D/W/S.a-Straight.other.2COLgrad c-D/W/S.a-Straight other
## a-Single.b-Gay.other.2COLgrad a-Single.b-Gay other
## b-Married.b-Gay.other.2COLgrad b-Married.b-Gay other
## c-D/W/S.b-Gay.other.2COLgrad c-D/W/S.b-Gay other
## a-Single.c-Bi.other.2COLgrad a-Single.c-Bi other
## b-Married.c-Bi.other.2COLgrad b-Married.c-Bi other
## c-D/W/S.c-Bi.other.2COLgrad c-D/W/S.c-Bi other
## educ menth se
## a-Single.a-Straight.awhite.0lessHS 0lessHS 11.794265 1.128811e+00
## b-Married.a-Straight.awhite.0lessHS 0lessHS 7.805961 7.921265e-01
## c-D/W/S.a-Straight.awhite.0lessHS 0lessHS 10.514376 7.023543e-01
## a-Single.b-Gay.awhite.0lessHS 0lessHS 26.478041 3.221214e+00
## b-Married.b-Gay.awhite.0lessHS 0lessHS 6.032955 2.376696e+00
## c-D/W/S.b-Gay.awhite.0lessHS 0lessHS 21.213488 3.575003e+00
## a-Single.c-Bi.awhite.0lessHS 0lessHS 20.688294 3.487896e+00
## b-Married.c-Bi.awhite.0lessHS 0lessHS 9.751669 2.275297e+00
## c-D/W/S.c-Bi.awhite.0lessHS 0lessHS 14.079241 5.318189e+00
## a-Single.a-Straight.black.0lessHS 0lessHS 8.916820 1.096959e+00
## b-Married.a-Straight.black.0lessHS 0lessHS 8.448669 1.919742e+00
## c-D/W/S.a-Straight.black.0lessHS 0lessHS 10.809821 1.525247e+00
## a-Single.b-Gay.black.0lessHS 0lessHS 4.379275 2.639196e+00
## b-Married.b-Gay.black.0lessHS 0lessHS 11.299842 8.129547e+00
## c-D/W/S.b-Gay.black.0lessHS 0lessHS 6.527142 4.919080e+00
## a-Single.c-Bi.black.0lessHS 0lessHS 13.656962 1.434026e+00
## b-Married.c-Bi.black.0lessHS 0lessHS 28.000000 3.552714e-15
## c-D/W/S.c-Bi.black.0lessHS 0lessHS 15.000000 0.000000e+00
## a-Single.a-Straight.hispanic.0lessHS 0lessHS 6.157033 1.129254e+00
## b-Married.a-Straight.hispanic.0lessHS 0lessHS 6.706228 1.243041e+00
## c-D/W/S.a-Straight.hispanic.0lessHS 0lessHS 7.760658 1.443049e+00
## a-Single.b-Gay.hispanic.0lessHS 0lessHS 6.828652 1.498006e+00
## c-D/W/S.b-Gay.hispanic.0lessHS 0lessHS 14.000000 0.000000e+00
## a-Single.c-Bi.hispanic.0lessHS 0lessHS 21.046334 5.703307e+00
## b-Married.c-Bi.hispanic.0lessHS 0lessHS 2.973221 3.369482e+00
## c-D/W/S.c-Bi.hispanic.0lessHS 0lessHS 26.056567 3.428686e+00
## a-Single.a-Straight.other.0lessHS 0lessHS 10.107865 2.292097e+00
## b-Married.a-Straight.other.0lessHS 0lessHS 11.017956 3.850277e+00
## c-D/W/S.a-Straight.other.0lessHS 0lessHS 12.179004 2.474465e+00
## a-Single.b-Gay.other.0lessHS 0lessHS 19.787813 3.264575e+00
## b-Married.b-Gay.other.0lessHS 0lessHS 7.000000 8.881784e-16
## a-Single.c-Bi.other.0lessHS 0lessHS 16.412000 1.739538e+00
## b-Married.c-Bi.other.0lessHS 0lessHS 22.356129 2.356569e+00
## c-D/W/S.c-Bi.other.0lessHS 0lessHS 11.484970 5.075914e+00
## a-Single.a-Straight.awhite.1HS/GED 1HS/GED 9.613254 3.301631e-01
## b-Married.a-Straight.awhite.1HS/GED 1HS/GED 6.537869 1.695888e-01
## c-D/W/S.a-Straight.awhite.1HS/GED 1HS/GED 8.566459 2.696338e-01
## a-Single.b-Gay.awhite.1HS/GED 1HS/GED 9.568200 1.379537e+00
## b-Married.b-Gay.awhite.1HS/GED 1HS/GED 7.906154 1.545303e+00
## c-D/W/S.b-Gay.awhite.1HS/GED 1HS/GED 9.664311 2.148115e+00
## a-Single.c-Bi.awhite.1HS/GED 1HS/GED 13.920270 1.068879e+00
## b-Married.c-Bi.awhite.1HS/GED 1HS/GED 11.541439 2.142462e+00
## c-D/W/S.c-Bi.awhite.1HS/GED 1HS/GED 12.939855 1.416143e+00
## a-Single.a-Straight.black.1HS/GED 1HS/GED 10.189538 7.972987e-01
## b-Married.a-Straight.black.1HS/GED 1HS/GED 8.177782 7.962061e-01
## c-D/W/S.a-Straight.black.1HS/GED 1HS/GED 8.548673 6.200365e-01
## a-Single.b-Gay.black.1HS/GED 1HS/GED 10.918169 2.380868e+00
## b-Married.b-Gay.black.1HS/GED 1HS/GED 4.128587 2.643185e+00
## c-D/W/S.b-Gay.black.1HS/GED 1HS/GED 2.043978 1.502854e+00
## a-Single.c-Bi.black.1HS/GED 1HS/GED 10.539408 3.742349e+00
## b-Married.c-Bi.black.1HS/GED 1HS/GED 5.797432 3.703513e+00
## c-D/W/S.c-Bi.black.1HS/GED 1HS/GED 10.005867 4.673755e+00
## a-Single.a-Straight.hispanic.1HS/GED 1HS/GED 9.586609 9.164320e-01
## b-Married.a-Straight.hispanic.1HS/GED 1HS/GED 6.511878 7.036288e-01
## c-D/W/S.a-Straight.hispanic.1HS/GED 1HS/GED 10.298819 1.182295e+00
## a-Single.b-Gay.hispanic.1HS/GED 1HS/GED 8.652167 3.693630e+00
## b-Married.b-Gay.hispanic.1HS/GED 1HS/GED 1.558054 1.731445e+00
## c-D/W/S.b-Gay.hispanic.1HS/GED 1HS/GED 8.586707 6.145590e+00
## a-Single.c-Bi.hispanic.1HS/GED 1HS/GED 12.748237 2.100676e+00
## b-Married.c-Bi.hispanic.1HS/GED 1HS/GED 12.060968 4.538251e+00
## c-D/W/S.c-Bi.hispanic.1HS/GED 1HS/GED 19.747042 3.034366e+00
## a-Single.a-Straight.other.1HS/GED 1HS/GED 12.024026 1.543720e+00
## b-Married.a-Straight.other.1HS/GED 1HS/GED 9.473355 9.712912e-01
## c-D/W/S.a-Straight.other.1HS/GED 1HS/GED 10.690483 1.096270e+00
## a-Single.b-Gay.other.1HS/GED 1HS/GED 12.136669 3.700485e+00
## b-Married.b-Gay.other.1HS/GED 1HS/GED 5.814500 7.194101e-01
## c-D/W/S.b-Gay.other.1HS/GED 1HS/GED 25.400941 1.391766e+00
## a-Single.c-Bi.other.1HS/GED 1HS/GED 13.267814 2.802822e+00
## b-Married.c-Bi.other.1HS/GED 1HS/GED 9.284862 4.195617e+00
## c-D/W/S.c-Bi.other.1HS/GED 1HS/GED 15.688267 5.548006e+00
## a-Single.a-Straight.awhite.2COLgrad 2COLgrad 7.542071 3.761465e-01
## b-Married.a-Straight.awhite.2COLgrad 2COLgrad 4.758016 1.544703e-01
## c-D/W/S.a-Straight.awhite.2COLgrad 2COLgrad 6.672729 3.014023e-01
## a-Single.b-Gay.awhite.2COLgrad 2COLgrad 7.027607 1.454898e+00
## b-Married.b-Gay.awhite.2COLgrad 2COLgrad 5.586158 1.148932e+00
## c-D/W/S.b-Gay.awhite.2COLgrad 2COLgrad 5.560119 1.460013e+00
## a-Single.c-Bi.awhite.2COLgrad 2COLgrad 11.248181 1.634879e+00
## b-Married.c-Bi.awhite.2COLgrad 2COLgrad 7.608294 1.285970e+00
## c-D/W/S.c-Bi.awhite.2COLgrad 2COLgrad 10.563897 2.422118e+00
## a-Single.a-Straight.black.2COLgrad 2COLgrad 6.657336 9.946921e-01
## b-Married.a-Straight.black.2COLgrad 2COLgrad 6.021909 1.325144e+00
## c-D/W/S.a-Straight.black.2COLgrad 2COLgrad 6.517146 8.934974e-01
## a-Single.b-Gay.black.2COLgrad 2COLgrad 5.282227 1.754791e+00
## b-Married.b-Gay.black.2COLgrad 2COLgrad 8.772987 3.330986e+00
## c-D/W/S.b-Gay.black.2COLgrad 2COLgrad 8.390376 2.902923e+00
## a-Single.c-Bi.black.2COLgrad 2COLgrad 4.158135 6.730516e-01
## b-Married.c-Bi.black.2COLgrad 2COLgrad 2.983535 1.464368e+00
## c-D/W/S.c-Bi.black.2COLgrad 2COLgrad 22.956529 7.312919e+00
## a-Single.a-Straight.hispanic.2COLgrad 2COLgrad 8.011450 1.271265e+00
## b-Married.a-Straight.hispanic.2COLgrad 2COLgrad 4.914962 7.073647e-01
## c-D/W/S.a-Straight.hispanic.2COLgrad 2COLgrad 8.173849 1.243832e+00
## a-Single.b-Gay.hispanic.2COLgrad 2COLgrad 2.193059 1.043116e+00
## b-Married.b-Gay.hispanic.2COLgrad 2COLgrad 3.387813 2.188922e+00
## c-D/W/S.b-Gay.hispanic.2COLgrad 2COLgrad 2.492468 1.492978e+00
## a-Single.c-Bi.hispanic.2COLgrad 2COLgrad 18.103454 4.823523e+00
## b-Married.c-Bi.hispanic.2COLgrad 2COLgrad 3.505820 1.743020e+00
## c-D/W/S.c-Bi.hispanic.2COLgrad 2COLgrad 16.364453 4.843254e+00
## a-Single.a-Straight.other.2COLgrad 2COLgrad 10.087926 1.167150e+00
## b-Married.a-Straight.other.2COLgrad 2COLgrad 5.280344 6.432116e-01
## c-D/W/S.a-Straight.other.2COLgrad 2COLgrad 5.006548 7.082757e-01
## a-Single.b-Gay.other.2COLgrad 2COLgrad 9.436188 1.129333e+00
## b-Married.b-Gay.other.2COLgrad 2COLgrad 12.382184 4.893995e+00
## c-D/W/S.b-Gay.other.2COLgrad 2COLgrad 29.435422 7.701181e-01
## a-Single.c-Bi.other.2COLgrad 2COLgrad 9.242729 2.531744e+00
## b-Married.c-Bi.other.2COLgrad 2COLgrad 9.263736 5.018307e+00
## c-D/W/S.c-Bi.other.2COLgrad 2COLgrad 12.725147 6.991703e+00
svyby(~menth,~marXsxo+age,des,svymean,na.rm=T)
## marXsxo age menth
## a-Single.a-Straight.(0,24] a-Single.a-Straight (0,24] 10.318492
## b-Married.a-Straight.(0,24] b-Married.a-Straight (0,24] 9.530202
## c-D/W/S.a-Straight.(0,24] c-D/W/S.a-Straight (0,24] 12.257672
## a-Single.b-Gay.(0,24] a-Single.b-Gay (0,24] 11.543644
## b-Married.b-Gay.(0,24] b-Married.b-Gay (0,24] 12.792586
## c-D/W/S.b-Gay.(0,24] c-D/W/S.b-Gay (0,24] 20.574679
## a-Single.c-Bi.(0,24] a-Single.c-Bi (0,24] 16.239456
## b-Married.c-Bi.(0,24] b-Married.c-Bi (0,24] 11.877602
## c-D/W/S.c-Bi.(0,24] c-D/W/S.c-Bi (0,24] 9.199244
## a-Single.a-Straight.(24,39] a-Single.a-Straight (24,39] 9.466425
## b-Married.a-Straight.(24,39] b-Married.a-Straight (24,39] 7.848932
## c-D/W/S.a-Straight.(24,39] c-D/W/S.a-Straight (24,39] 9.762285
## a-Single.b-Gay.(24,39] a-Single.b-Gay (24,39] 8.883293
## b-Married.b-Gay.(24,39] b-Married.b-Gay (24,39] 10.153620
## c-D/W/S.b-Gay.(24,39] c-D/W/S.b-Gay (24,39] 8.655175
## a-Single.c-Bi.(24,39] a-Single.c-Bi (24,39] 11.776343
## b-Married.c-Bi.(24,39] b-Married.c-Bi (24,39] 9.715789
## c-D/W/S.c-Bi.(24,39] c-D/W/S.c-Bi (24,39] 15.288045
## a-Single.a-Straight.(39,59] a-Single.a-Straight (39,59] 9.538942
## b-Married.a-Straight.(39,59] b-Married.a-Straight (39,59] 6.410983
## c-D/W/S.a-Straight.(39,59] c-D/W/S.a-Straight (39,59] 10.019510
## a-Single.b-Gay.(39,59] a-Single.b-Gay (39,59] 9.652620
## b-Married.b-Gay.(39,59] b-Married.b-Gay (39,59] 5.346372
## c-D/W/S.b-Gay.(39,59] c-D/W/S.b-Gay (39,59] 11.049340
## a-Single.c-Bi.(39,59] a-Single.c-Bi (39,59] 16.117107
## b-Married.c-Bi.(39,59] b-Married.c-Bi (39,59] 12.771546
## c-D/W/S.c-Bi.(39,59] c-D/W/S.c-Bi (39,59] 13.597398
## a-Single.a-Straight.(59,79] a-Single.a-Straight (59,79] 6.249645
## b-Married.a-Straight.(59,79] b-Married.a-Straight (59,79] 4.861014
## c-D/W/S.a-Straight.(59,79] c-D/W/S.a-Straight (59,79] 7.006121
## a-Single.b-Gay.(59,79] a-Single.b-Gay (59,79] 6.937677
## b-Married.b-Gay.(59,79] b-Married.b-Gay (59,79] 5.992711
## c-D/W/S.b-Gay.(59,79] c-D/W/S.b-Gay (59,79] 6.251409
## a-Single.c-Bi.(59,79] a-Single.c-Bi (59,79] 7.116311
## b-Married.c-Bi.(59,79] b-Married.c-Bi (59,79] 4.162416
## c-D/W/S.c-Bi.(59,79] c-D/W/S.c-Bi (59,79] 9.678556
## a-Single.a-Straight.(79,99] a-Single.a-Straight (79,99] 5.081988
## b-Married.a-Straight.(79,99] b-Married.a-Straight (79,99] 2.930395
## c-D/W/S.a-Straight.(79,99] c-D/W/S.a-Straight (79,99] 4.795106
## a-Single.b-Gay.(79,99] a-Single.b-Gay (79,99] 2.551767
## b-Married.b-Gay.(79,99] b-Married.b-Gay (79,99] 14.000000
## c-D/W/S.b-Gay.(79,99] c-D/W/S.b-Gay (79,99] 1.139670
## a-Single.c-Bi.(79,99] a-Single.c-Bi (79,99] 0.000000
## b-Married.c-Bi.(79,99] b-Married.c-Bi (79,99] 5.729150
## c-D/W/S.c-Bi.(79,99] c-D/W/S.c-Bi (79,99] 8.162664
## se
## a-Single.a-Straight.(0,24] 0.5330196
## b-Married.a-Straight.(0,24] 1.6072149
## c-D/W/S.a-Straight.(0,24] 1.8928916
## a-Single.b-Gay.(0,24] 2.3127707
## b-Married.b-Gay.(0,24] 3.8042881
## c-D/W/S.b-Gay.(0,24] 5.3334417
## a-Single.c-Bi.(0,24] 1.2687454
## b-Married.c-Bi.(0,24] 3.0621418
## c-D/W/S.c-Bi.(0,24] 3.7818931
## a-Single.a-Straight.(24,39] 0.3189959
## b-Married.a-Straight.(24,39] 0.2879589
## c-D/W/S.a-Straight.(24,39] 0.5245797
## a-Single.b-Gay.(24,39] 1.8374664
## b-Married.b-Gay.(24,39] 1.9844825
## c-D/W/S.b-Gay.(24,39] 3.0391360
## a-Single.c-Bi.(24,39] 1.2144361
## b-Married.c-Bi.(24,39] 1.1090725
## c-D/W/S.c-Bi.(24,39] 1.7879664
## a-Single.a-Straight.(39,59] 0.5125891
## b-Married.a-Straight.(39,59] 0.1833055
## c-D/W/S.a-Straight.(39,59] 0.3175174
## a-Single.b-Gay.(39,59] 1.6951503
## b-Married.b-Gay.(39,59] 1.0425418
## c-D/W/S.b-Gay.(39,59] 2.2705925
## a-Single.c-Bi.(39,59] 4.1568949
## b-Married.c-Bi.(39,59] 2.7731844
## c-D/W/S.c-Bi.(39,59] 1.8675469
## a-Single.a-Straight.(59,79] 0.5820557
## b-Married.a-Straight.(59,79] 0.1974527
## c-D/W/S.a-Straight.(59,79] 0.2757367
## a-Single.b-Gay.(59,79] 1.9933960
## b-Married.b-Gay.(59,79] 1.6708247
## c-D/W/S.b-Gay.(59,79] 1.7665167
## a-Single.c-Bi.(59,79] 2.1562299
## b-Married.c-Bi.(59,79] 1.8386300
## c-D/W/S.c-Bi.(59,79] 2.8281388
## a-Single.a-Straight.(79,99] 2.7702473
## b-Married.a-Straight.(79,99] 0.4005422
## c-D/W/S.a-Straight.(79,99] 0.5552466
## a-Single.b-Gay.(79,99] 2.8604064
## b-Married.b-Gay.(79,99] 0.0000000
## c-D/W/S.b-Gay.(79,99] 0.6328713
## a-Single.c-Bi.(79,99] 0.0000000
## b-Married.c-Bi.(79,99] 3.7728533
## c-D/W/S.c-Bi.(79,99] 4.5429972
round(exp(summary(fit5)$coef[-1,1]),3)
## factor(marXsxo)b-Married.a-Straight factor(marXsxo)c-D/W/S.a-Straight
## 0.919 1.070
## factor(marXsxo)a-Single.b-Gay factor(marXsxo)b-Married.b-Gay
## 1.034 0.829
## factor(marXsxo)c-D/W/S.b-Gay factor(marXsxo)a-Single.c-Bi
## 1.167 1.149
## factor(marXsxo)b-Married.c-Bi factor(marXsxo)c-D/W/S.c-Bi
## 1.332 1.269
## factor(sex)1 factor(age)(24,39]
## 0.811 0.944
## factor(age)(39,59] factor(age)(59,79]
## 0.817 0.621
## factor(age)(79,99] factor(race)black
## 0.457 0.961
## factor(race)hispanic factor(race)other
## 0.927 1.109
## factor(educ)1HS/GED factor(educ)2COLgrad
## 1.006 0.884
## factor(income)>75k factor(income)$25k<$75k
## 0.905 0.948
## factor(poorhlt)1 factor(poorhlt)2
## 0.543 0.795
## factor(poorhlt)3 factor(poorhlt)4
## 0.833 0.956
## factor(poorhlt)5 factor(poorhlt)6
## 1.359 1.085
## factor(poorhlt)7 factor(poorhlt)8
## 1.134 1.274
## factor(poorhlt)9 factor(poorhlt)10
## 0.797 1.812
## factor(poorhlt)11 factor(poorhlt)12
## 1.068 1.711
## factor(poorhlt)13 factor(poorhlt)14
## 1.090 1.494
## factor(poorhlt)15 factor(poorhlt)16
## 2.153 1.260
## factor(poorhlt)17 factor(poorhlt)18
## 1.644 2.827
## factor(poorhlt)19 factor(poorhlt)20
## 2.750 2.436
## factor(poorhlt)21 factor(poorhlt)22
## 1.854 4.112
## factor(poorhlt)23 factor(poorhlt)24
## 1.342 2.993
## factor(poorhlt)25 factor(poorhlt)26
## 2.427 3.299
## factor(poorhlt)27 factor(poorhlt)28
## 2.578 2.313
## factor(poorhlt)29 factor(poorhlt)30
## 2.217 2.383
## factor(smoke)Y factor(drinks)10-30
## 1.168 1.352
## factor(drinks)5-10 factor(bmi)over/obese
## 1.205 0.949
## factor(bmi)underwght factor(medcost)Y
## 0.977 1.300
## factor(insurance)Y factor(checkup)2+yrs
## 1.111 1.067
## factor(ownhome)Y
## 0.909
exp(coef(fit5))
## (Intercept) factor(marXsxo)b-Married.a-Straight
## 8.3683256 0.9186993
## factor(marXsxo)c-D/W/S.a-Straight factor(marXsxo)a-Single.b-Gay
## 1.0697117 1.0339600
## factor(marXsxo)b-Married.b-Gay factor(marXsxo)c-D/W/S.b-Gay
## 0.8292012 1.1671388
## factor(marXsxo)a-Single.c-Bi factor(marXsxo)b-Married.c-Bi
## 1.1486160 1.3323937
## factor(marXsxo)c-D/W/S.c-Bi factor(sex)1
## 1.2685901 0.8113965
## factor(age)(24,39] factor(age)(39,59]
## 0.9435981 0.8172088
## factor(age)(59,79] factor(age)(79,99]
## 0.6208972 0.4566165
## factor(race)black factor(race)hispanic
## 0.9613157 0.9266055
## factor(race)other factor(educ)1HS/GED
## 1.1094922 1.0056285
## factor(educ)2COLgrad factor(income)>75k
## 0.8835578 0.9051289
## factor(income)$25k<$75k factor(poorhlt)1
## 0.9480452 0.5428507
## factor(poorhlt)2 factor(poorhlt)3
## 0.7953938 0.8330819
## factor(poorhlt)4 factor(poorhlt)5
## 0.9562690 1.3594613
## factor(poorhlt)6 factor(poorhlt)7
## 1.0853426 1.1340547
## factor(poorhlt)8 factor(poorhlt)9
## 1.2738679 0.7967975
## factor(poorhlt)10 factor(poorhlt)11
## 1.8123482 1.0676120
## factor(poorhlt)12 factor(poorhlt)13
## 1.7105536 1.0899340
## factor(poorhlt)14 factor(poorhlt)15
## 1.4939998 2.1527198
## factor(poorhlt)16 factor(poorhlt)17
## 1.2603094 1.6442335
## factor(poorhlt)18 factor(poorhlt)19
## 2.8265251 2.7495304
## factor(poorhlt)20 factor(poorhlt)21
## 2.4358245 1.8544171
## factor(poorhlt)22 factor(poorhlt)23
## 4.1120496 1.3419334
## factor(poorhlt)24 factor(poorhlt)25
## 2.9934907 2.4274877
## factor(poorhlt)26 factor(poorhlt)27
## 3.2987977 2.5775541
## factor(poorhlt)28 factor(poorhlt)29
## 2.3131525 2.2173722
## factor(poorhlt)30 factor(smoke)Y
## 2.3834775 1.1676267
## factor(drinks)10-30 factor(drinks)5-10
## 1.3523894 1.2047207
## factor(bmi)over/obese factor(bmi)underwght
## 0.9485284 0.9770719
## factor(medcost)Y factor(insurance)Y
## 1.2997979 1.1106695
## factor(checkup)2+yrs factor(ownhome)Y
## 1.0665554 0.9088792
exp(coef(fit8))
## (Intercept) factor(marXsxo)b-Married.a-Straight
## 8.8818006 0.9141290
## factor(marXsxo)c-D/W/S.a-Straight factor(marXsxo)a-Single.b-Gay
## 1.0385414 1.0491846
## factor(marXsxo)b-Married.b-Gay factor(marXsxo)c-D/W/S.b-Gay
## 0.9912743 1.2942505
## factor(marXsxo)a-Single.c-Bi factor(marXsxo)b-Married.c-Bi
## 1.0829096 1.0977489
## factor(marXsxo)c-D/W/S.c-Bi factor(sex)1
## 1.2411660 0.8196008
## factor(age)(24,39] factor(age)(39,59]
## 0.9309169 0.8090201
## factor(age)(59,79] factor(age)(79,99]
## 0.6186637 0.4293510
## factor(race)black factor(race)hispanic
## 0.9520667 0.9749869
## factor(race)other factor(educ)1HS/GED
## 1.0506897 1.0061837
## factor(educ)2COLgrad factor(income)>75k
## 0.9405126 0.8496646
## factor(income)$25k<$75k factor(poorhlt)1
## 0.9213597 0.4970160
## factor(poorhlt)2 factor(poorhlt)3
## 0.7229436 0.8052659
## factor(poorhlt)4 factor(poorhlt)5
## 0.9398819 1.2327295
## factor(poorhlt)6 factor(poorhlt)7
## 1.0585182 1.0993958
## factor(poorhlt)8 factor(poorhlt)9
## 1.2253922 0.8670857
## factor(poorhlt)10 factor(poorhlt)11
## 1.7079621 1.0187650
## factor(poorhlt)12 factor(poorhlt)13
## 1.7401651 1.6754375
## factor(poorhlt)14 factor(poorhlt)15
## 1.5528442 2.0341117
## factor(poorhlt)16 factor(poorhlt)17
## 1.4457077 1.3953942
## factor(poorhlt)18 factor(poorhlt)19
## 2.3353324 2.5724803
## factor(poorhlt)20 factor(poorhlt)21
## 2.3961737 1.5539506
## factor(poorhlt)22 factor(poorhlt)23
## 3.1025341 2.0797069
## factor(poorhlt)24 factor(poorhlt)25
## 2.4467310 2.5628064
## factor(poorhlt)26 factor(poorhlt)27
## 3.0681033 2.4983005
## factor(poorhlt)28 factor(poorhlt)29
## 2.5512155 2.2386730
## factor(poorhlt)30 factor(smoke)Y
## 2.2435910 1.1789843
## factor(drinks)10-30 factor(drinks)5-10
## 1.3220813 1.1334491
## factor(bmi)over/obese factor(bmi)underwght
## 0.9871764 1.0571226
## factor(medcost)Y factor(insurance)Y
## 1.2705130 1.0248353
## factor(checkup)2+yrs factor(ownhome)Y
## 1.0617222 0.9174523
library(ggplot2)
brfss151617%>%
ggplot(aes(menth))+geom_histogram()
## `stat_bin()` using `bins = 30`. Pick better value with `binwidth`.

c(nb=AIC(fit5),pois=AIC(fit8))
## nb pois
## 251874.2 532549.0
exp(fit5$coefficients)
## (Intercept) factor(marXsxo)b-Married.a-Straight
## 8.3683256 0.9186993
## factor(marXsxo)c-D/W/S.a-Straight factor(marXsxo)a-Single.b-Gay
## 1.0697117 1.0339600
## factor(marXsxo)b-Married.b-Gay factor(marXsxo)c-D/W/S.b-Gay
## 0.8292012 1.1671388
## factor(marXsxo)a-Single.c-Bi factor(marXsxo)b-Married.c-Bi
## 1.1486160 1.3323937
## factor(marXsxo)c-D/W/S.c-Bi factor(sex)1
## 1.2685901 0.8113965
## factor(age)(24,39] factor(age)(39,59]
## 0.9435981 0.8172088
## factor(age)(59,79] factor(age)(79,99]
## 0.6208972 0.4566165
## factor(race)black factor(race)hispanic
## 0.9613157 0.9266055
## factor(race)other factor(educ)1HS/GED
## 1.1094922 1.0056285
## factor(educ)2COLgrad factor(income)>75k
## 0.8835578 0.9051289
## factor(income)$25k<$75k factor(poorhlt)1
## 0.9480452 0.5428507
## factor(poorhlt)2 factor(poorhlt)3
## 0.7953938 0.8330819
## factor(poorhlt)4 factor(poorhlt)5
## 0.9562690 1.3594613
## factor(poorhlt)6 factor(poorhlt)7
## 1.0853426 1.1340547
## factor(poorhlt)8 factor(poorhlt)9
## 1.2738679 0.7967975
## factor(poorhlt)10 factor(poorhlt)11
## 1.8123482 1.0676120
## factor(poorhlt)12 factor(poorhlt)13
## 1.7105536 1.0899340
## factor(poorhlt)14 factor(poorhlt)15
## 1.4939998 2.1527198
## factor(poorhlt)16 factor(poorhlt)17
## 1.2603094 1.6442335
## factor(poorhlt)18 factor(poorhlt)19
## 2.8265251 2.7495304
## factor(poorhlt)20 factor(poorhlt)21
## 2.4358245 1.8544171
## factor(poorhlt)22 factor(poorhlt)23
## 4.1120496 1.3419334
## factor(poorhlt)24 factor(poorhlt)25
## 2.9934907 2.4274877
## factor(poorhlt)26 factor(poorhlt)27
## 3.2987977 2.5775541
## factor(poorhlt)28 factor(poorhlt)29
## 2.3131525 2.2173722
## factor(poorhlt)30 factor(smoke)Y
## 2.3834775 1.1676267
## factor(drinks)10-30 factor(drinks)5-10
## 1.3523894 1.2047207
## factor(bmi)over/obese factor(bmi)underwght
## 0.9485284 0.9770719
## factor(medcost)Y factor(insurance)Y
## 1.2997979 1.1106695
## factor(checkup)2+yrs factor(ownhome)Y
## 1.0665554 0.9088792
table(brfss151617$marXsxo,brfss151617$menth)
##
## 0 1 2 3 4 5 6 7 8 9
## a-Single.a-Straight 1504 351 597 398 229 503 64 271 50 6
## b-Married.a-Straight 8761 1515 2229 1223 626 1672 160 462 100 15
## c-D/W/S.a-Straight 4824 749 1193 731 380 951 124 345 69 11
## a-Single.b-Gay 116 33 44 36 11 60 8 26 5 0
## b-Married.b-Gay 97 22 33 11 5 23 4 13 1 1
## c-D/W/S.b-Gay 42 5 15 7 8 18 2 4 2 0
## a-Single.c-Bi 58 23 41 23 10 36 7 22 4 0
## b-Married.c-Bi 97 20 40 24 12 47 2 13 0 0
## c-D/W/S.c-Bi 65 15 30 21 5 31 0 17 3 0
##
## 10 11 12 13 14 15 16 17 18 19
## a-Single.a-Straight 420 4 35 6 82 407 10 3 10 1
## b-Married.a-Straight 1039 5 66 8 152 881 8 11 16 2
## c-D/W/S.a-Straight 764 2 49 9 136 714 15 10 12 1
## a-Single.b-Gay 31 0 4 0 7 32 1 1 1 0
## b-Married.b-Gay 17 0 0 0 6 17 1 1 0 0
## c-D/W/S.b-Gay 5 0 4 0 3 11 0 0 0 0
## a-Single.c-Bi 33 0 5 0 13 59 2 1 0 0
## b-Married.c-Bi 33 0 2 0 5 24 1 0 0 0
## c-D/W/S.c-Bi 19 0 2 1 4 26 0 0 0 0
##
## 20 21 22 23 24 25 26 27 28 29
## a-Single.a-Straight 290 18 8 4 9 100 5 6 23 14
## b-Married.a-Straight 512 27 10 2 4 146 5 9 58 36
## c-D/W/S.a-Straight 488 23 14 5 4 167 3 11 44 25
## a-Single.b-Gay 23 0 2 0 1 5 0 0 1 0
## b-Married.b-Gay 4 0 0 0 0 3 0 0 1 1
## c-D/W/S.b-Gay 5 2 1 0 0 3 0 1 0 0
## a-Single.c-Bi 34 0 2 0 1 8 1 2 9 3
## b-Married.c-Bi 27 1 0 0 1 5 0 0 1 1
## c-D/W/S.c-Bi 13 2 0 1 0 8 1 0 3 2
##
## 30
## a-Single.a-Straight 813
## b-Married.a-Straight 1662
## c-D/W/S.a-Straight 1725
## a-Single.b-Gay 68
## b-Married.b-Gay 23
## c-D/W/S.b-Gay 33
## a-Single.c-Bi 83
## b-Married.c-Bi 47
## c-D/W/S.c-Bi 85
mean(brfss151617$menth)%>%round(4)
## [1] 7.0168
var(brfss151617$menth)%>%round(4)
## [1] 95.6901
summary(brfss151617)
## poorhlt menth medcost income
## Min. : 0.000 Min. : 0.000 N:37178 <$25k :10906
## 1st Qu.: 0.000 1st Qu.: 0.000 Y: 6291 >75k :13918
## Median : 0.000 Median : 2.000 $25k<$75k:18645
## Mean : 4.857 Mean : 7.017
## 3rd Qu.: 5.000 3rd Qu.:10.000
## Max. :30.000 Max. :30.000
##
## marital sxorient age educ
## a-Single : 7237 a-Straight:41261 (0,24] : 1390 0lessHS : 2392
## b-Married:22109 b-Gay : 971 (24,39]: 7905 1HS/GED :25476
## c-D/W/S :14123 c-Bi : 1237 (39,59]:15548 2COLgrad:15601
## (59,79]:16231
## (79,99]: 2395
##
##
## checkup insurance marXsxo ownhome smoke
## 1-2yrs:37162 N: 3078 b-Married.a-Straight:21422 N:12958 N:27840
## 2+yrs : 6307 Y:40391 c-D/W/S.a-Straight :13598 Y:30511 Y:15629
## a-Single.a-Straight : 6241
## a-Single.b-Gay : 516
## a-Single.c-Bi : 480
## b-Married.c-Bi : 403
## (Other) : 809
## drinks bmi race sex
## 1-5 :40178 normalwght:13153 awhite :35853 0:22111
## 10-30: 667 over/obese:29627 black : 2624 1:21358
## 5-10 : 2624 underwght : 689 hispanic: 2180
## other : 2812
##
##
##
## X_STRWT X_LLCPWT
## Min. : 0.4054 Min. : 0.38
## 1st Qu.: 17.3550 1st Qu.: 113.36
## Median : 44.8038 Median : 288.14
## Mean : 101.3738 Mean : 671.61
## 3rd Qu.: 111.8658 3rd Qu.: 750.87
## Max. :1792.5737 Max. :35699.02
##
table(brfss151617$marXsxo,brfss151617$menth)
##
## 0 1 2 3 4 5 6 7 8 9
## a-Single.a-Straight 1504 351 597 398 229 503 64 271 50 6
## b-Married.a-Straight 8761 1515 2229 1223 626 1672 160 462 100 15
## c-D/W/S.a-Straight 4824 749 1193 731 380 951 124 345 69 11
## a-Single.b-Gay 116 33 44 36 11 60 8 26 5 0
## b-Married.b-Gay 97 22 33 11 5 23 4 13 1 1
## c-D/W/S.b-Gay 42 5 15 7 8 18 2 4 2 0
## a-Single.c-Bi 58 23 41 23 10 36 7 22 4 0
## b-Married.c-Bi 97 20 40 24 12 47 2 13 0 0
## c-D/W/S.c-Bi 65 15 30 21 5 31 0 17 3 0
##
## 10 11 12 13 14 15 16 17 18 19
## a-Single.a-Straight 420 4 35 6 82 407 10 3 10 1
## b-Married.a-Straight 1039 5 66 8 152 881 8 11 16 2
## c-D/W/S.a-Straight 764 2 49 9 136 714 15 10 12 1
## a-Single.b-Gay 31 0 4 0 7 32 1 1 1 0
## b-Married.b-Gay 17 0 0 0 6 17 1 1 0 0
## c-D/W/S.b-Gay 5 0 4 0 3 11 0 0 0 0
## a-Single.c-Bi 33 0 5 0 13 59 2 1 0 0
## b-Married.c-Bi 33 0 2 0 5 24 1 0 0 0
## c-D/W/S.c-Bi 19 0 2 1 4 26 0 0 0 0
##
## 20 21 22 23 24 25 26 27 28 29
## a-Single.a-Straight 290 18 8 4 9 100 5 6 23 14
## b-Married.a-Straight 512 27 10 2 4 146 5 9 58 36
## c-D/W/S.a-Straight 488 23 14 5 4 167 3 11 44 25
## a-Single.b-Gay 23 0 2 0 1 5 0 0 1 0
## b-Married.b-Gay 4 0 0 0 0 3 0 0 1 1
## c-D/W/S.b-Gay 5 2 1 0 0 3 0 1 0 0
## a-Single.c-Bi 34 0 2 0 1 8 1 2 9 3
## b-Married.c-Bi 27 1 0 0 1 5 0 0 1 1
## c-D/W/S.c-Bi 13 2 0 1 0 8 1 0 3 2
##
## 30
## a-Single.a-Straight 813
## b-Married.a-Straight 1662
## c-D/W/S.a-Straight 1725
## a-Single.b-Gay 68
## b-Married.b-Gay 23
## c-D/W/S.b-Gay 33
## a-Single.c-Bi 83
## b-Married.c-Bi 47
## c-D/W/S.c-Bi 85