For this assignment, I chose to work with data provided by the NHIS (National Health Interview Survey) because it was rich in survey questions that tackled subjects such as: disabilities, sexually trasmitted diseases, immigration, education and public service etc. However, for this assignment, I want to focus on the issue of mental health. The data that was provided did briefly mention senility but for the purpose of this assignment, it did not provide the necessary responses that I wanted to address, so instead, an effect of Alzheimer’s Disease was used as the binary dependent for this analysis. The variable used was limitations, in any way, because of difficulty remembering and/or periods of confusion.
Additional effects of Alzheimer’s Disease include:
The effect that I will be focusing on is the first one, memory loss, I chose to work with the file titled Persons for the 2017 calendar year. For your reference, you can download the data set and codebook here
RESEARCH QUESTION
For my research question I want to know Which factors play a role in the limitations (in any way) of those that have difficulty remembering or experience periods of confusion?
VARIABLES USED
HYPOTHESES
#install.packages("pander")
#install.packages("radiant.data")
#install.packages("texreg")
#install.packages("lmtest")
#install.packages("visreg")
library(readr)
library(dplyr)
library(knitr)
#read_csv("/Users/safiesaf/Downloads/personsx.csv")
#head()
DRem<-read_csv("/Users/safiesaf/Downloads/personsx.csv")
DiffRem<-DRem%>%
rename("Race"=RACRECI3,
"Age"=AGE_P,
"MaritalStat"=CDCMSTAT,
"MemoryConfusion"=PLAREMEM,
"Depress_Anx"=LACHRC17,
"Sex"=SEX)%>%
select(Race,
Age,
MaritalStat,
MemoryConfusion,
Depress_Anx,
Sex)%>%
#head(DiffRem)
mutate(Race=ifelse(Race==1,"White",
ifelse(Race==2,"Black",
ifelse(Race==3,"Asian",NA))),
MaritalStat=ifelse(MaritalStat==1,"Separated",
ifelse(MaritalStat==2,"Divorced",
ifelse(MaritalStat==3,"Married",
ifelse(MaritalStat==4,"Single_NeverMarried",
ifelse(MaritalStat==5,"Widowed",NA))))),
MemoryConfusion=ifelse(MemoryConfusion==2,0,
ifelse(MemoryConfusion==1,1,NA)),#2= No, 1=Yes
Depress_Anx=ifelse(Depress_Anx==1,"Chronic",
ifelse(Depress_Anx==2,"Not_Chronic",NA)),
Sex=ifelse(Sex==1,"Male",
ifelse(Sex==2,"Female",NA)),
Age=ifelse(Age==997,NA,Age))
#kable(DiffRem)
I have filtered out all of those pesky little ‘NAs’ from my data set and we can proceed with the generation of a few models to answer our hypotheses.
library(radiant.data)
library(dplyr)
DiffRem%>%
filter(!is.na(Race=="White"|
Race=="Black"|
Race=="Asian"),
!is.na(MaritalStat=="Separated"|
MaritalStat=="Divorced"|
MaritalStat=="Married"|
MaritalStat=="Single_NeverMarried"|
MaritalStat=="Widowed"),
!is.na(Depress_Anx=="Chronic"|
Depress_Anx=="Not_Chronic"),
!is.na(Sex=="Male"|
Sex=="Female"),
!is.na(MemoryConfusion==0|
MemoryConfusion==1),
(Age!=997))
m0 <- glm(MemoryConfusion ~ Race, family = binomial, data =DiffRem)
summary(m0)
Call:
glm(formula = MemoryConfusion ~ Race, family = binomial, data = DiffRem)
Deviance Residuals:
Min 1Q Median 3Q Max
-0.2821 -0.2520 -0.2520 -0.2520 2.7545
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -3.77094 0.09473 -39.808 < 2e-16 ***
RaceBlack 0.56670 0.10860 5.218 1.81e-07 ***
RaceWhite 0.33741 0.09750 3.461 0.000539 ***
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 21512 on 76608 degrees of freedom
Residual deviance: 21481 on 76606 degrees of freedom
(1523 observations deleted due to missingness)
AIC: 21487
Number of Fisher Scoring iterations: 6
Model 1: Race
Variable Race was added to the first model to see if there would be any changed in remebering/confusion. Results show that blacks have a 0.57 chance of experiencing difficulty remembering or having periods of confusion than the other races.
m1 <- glm(MemoryConfusion ~ Race + Age + MaritalStat + Depress_Anx + Sex, family = binomial, data = DiffRem)
summary(m1)
Call:
glm(formula = MemoryConfusion ~ Race + Age + MaritalStat + Depress_Anx +
Sex, family = binomial, data = DiffRem)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.4763 -1.0229 -0.8268 1.2499 1.7242
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) -1.475633 0.461486 -3.198 0.00139 **
RaceBlack 0.012618 0.417348 0.030 0.97588
RaceWhite -0.227994 0.392742 -0.581 0.56157
Age 0.022896 0.003972 5.764 8.2e-09 ***
MaritalStatMarried -0.159522 0.146837 -1.086 0.27731
MaritalStatSeparated -0.006765 0.262960 -0.026 0.97947
MaritalStatSingle_NeverMarried 0.061525 0.159260 0.386 0.69926
MaritalStatWidowed 0.105443 0.217787 0.484 0.62827
Depress_AnxNot_Chronic -0.273372 0.747085 -0.366 0.71443
SexMale 0.354614 0.111914 3.169 0.00153 **
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1991.9 on 1472 degrees of freedom
Residual deviance: 1932.9 on 1463 degrees of freedom
(76659 observations deleted due to missingness)
AIC: 1952.9
Number of Fisher Scoring iterations: 4
Model 2: Race, Age, Marital Status, Depression/Anxiety and Sex
MARITAL STATUS
The results show that married couples have a -0.16 chance of experiencing difficulty remembering or having periods of confusion than any other marital status. Those that are separated have a -0.007 chance of experiencing difficulty remembering or having periods of confusion. Those that are single (never married) experience a 0.06 chance of experiencing difficulty remembering or having periods of confusion. Those that are widowed experience a 0.11 chance of experiencing difficulty remembering or having periods of confusion. This means that those that are widowed experience the greatest difficulty remembering and/or confusion followed by single respondents. Married respondents have the lowest chance of experiencing difficulty remembering and/or confusion, followed by those that are separted.
DEPRESSION
Those that are not chronically depressed have a -0.28 chance of experiencing difficulty remembering and/or confusion as opposed to chronically depressed people, this means that respondents that are not depressed do not tend to experience difficulty remembering/confusion.
SEX
Results show that male respondents have a 0.35 chance of experiencing difficulty remembering/confusion than women. This ultimately means that of the both sexes, men tend to experience confusion more and have greater difficulty rememberin.
AGE
Results show that those greater in age have a 0.02 chance of experiencing difficulty remembering/confusion than those that a younger in age. This interprets to the older you are, the more likely you are to experience periods of confusion and difficulty remembering.
m2 <- glm(MemoryConfusion ~ Sex*Race + Depress_Anx, family = binomial, data = DiffRem)
summary(m2)
Model 3: Interaction between Sex & Race
Results show that black males have a 1.27 chance of experiencing difficulty remembering/confusion, where as, white men have a 0.8 chance of remembering/confusion.
m3 <- glm(MemoryConfusion ~ Sex*Race + Depress_Anx + MaritalStat, family = binomial, data = DiffRem)
summary(m3)
Call:
glm(formula = MemoryConfusion ~ Sex * Race + Depress_Anx + MaritalStat,
family = binomial, data = DiffRem)
Deviance Residuals:
Min 1Q Median 3Q Max
-1.5548 -0.9986 -0.8910 1.2838 1.4939
Coefficients:
Estimate Std. Error z value Pr(>|z|)
(Intercept) 0.09307 0.48495 0.192 0.8478
SexMale -0.39434 0.80533 -0.490 0.6244
RaceBlack -0.43090 0.51625 -0.835 0.4039
RaceWhite -0.55446 0.48201 -1.150 0.2500
Depress_AnxNot_Chronic -0.22718 0.74176 -0.306 0.7594
MaritalStatMarried -0.12798 0.14549 -0.880 0.3791
MaritalStatSeparated -0.09858 0.26102 -0.378 0.7057
MaritalStatSingle_NeverMarried -0.25762 0.14781 -1.743 0.0814 .
MaritalStatWidowed 0.44264 0.20900 2.118 0.0342 *
SexMale:RaceBlack 1.14347 0.86483 1.322 0.1861
SexMale:RaceWhite 0.73703 0.81408 0.905 0.3653
---
Signif. codes: 0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
(Dispersion parameter for binomial family taken to be 1)
Null deviance: 1991.9 on 1472 degrees of freedom
Residual deviance: 1964.6 on 1462 degrees of freedom
(76659 observations deleted due to missingness)
AIC: 1986.6
Number of Fisher Scoring iterations: 4
Model 4: Addition of Marital Status to the interaction
The results show that adding married respondents to the analysis, the difficulty of remembering/ expeiencing confusion goes down, married persons have a -0.13 difficulty remembering/confusion and widows have a 0.44 difficulty remembering/confusion. This ultimately shows that the loss of a spouse negatively affects the way respondents remember and experience confusion.
library(texreg)
htmlreg(list(m0,m1,m2,m3),doctype=FALSE)
| Model 1 | Model 2 | Model 3 | Model 4 | ||
|---|---|---|---|---|---|
| (Intercept) | -3.77*** | -1.48** | 0.11 | 0.09 | |
| (0.09) | (0.46) | (0.46) | (0.48) | ||
| RaceBlack | 0.57*** | 0.01 | -0.55 | -0.43 | |
| (0.11) | (0.42) | (0.50) | (0.52) | ||
| RaceWhite | 0.34*** | -0.23 | -0.63 | -0.55 | |
| (0.10) | (0.39) | (0.47) | (0.48) | ||
| Age | 0.02*** | ||||
| (0.00) | |||||
| MaritalStatMarried | -0.16 | -0.13 | |||
| (0.15) | (0.15) | ||||
| MaritalStatSeparated | -0.01 | -0.10 | |||
| (0.26) | (0.26) | ||||
| MaritalStatSingle_NeverMarried | 0.06 | -0.26 | |||
| (0.16) | (0.15) | ||||
| MaritalStatWidowed | 0.11 | 0.44* | |||
| (0.22) | (0.21) | ||||
| Depress_AnxNot_Chronic | -0.27 | -0.16 | -0.23 | ||
| (0.75) | (0.74) | (0.74) | |||
| SexMale | 0.35** | -0.52 | -0.39 | ||
| (0.11) | (0.79) | (0.81) | |||
| SexMale:RaceBlack | 1.24 | 1.14 | |||
| (0.85) | (0.86) | ||||
| SexMale:RaceWhite | 0.81 | 0.74 | |||
| (0.80) | (0.81) | ||||
| AIC | 21486.87 | 1952.93 | 1995.78 | 1986.64 | |
| BIC | 21514.60 | 2005.88 | 2032.86 | 2044.88 | |
| Log Likelihood | -10740.43 | -966.47 | -990.89 | -982.32 | |
| Deviance | 21480.87 | 1932.93 | 1981.78 | 1964.64 | |
| Num. obs. | 76609 | 1473 | 1476 | 1473 | |
| p < 0.001, p < 0.01, p < 0.05 | |||||
library(visreg)
visreg(m1, "Age", scale = "response")
The results above show a positive relationship between respondents and age i.e. as respondents increase in age, they experience greater difficulty in remembering/confusion this they are limited in some way.
library(visreg)
visreg(m1, "Sex", scale = "response", line = list (col = "green"), fill = list (col = "grey"))
The results above show that between both sexes, men are limited in some way due to difficulty remembering or experiencing some periods of confusion.
library(visreg)
visreg(m1, "Race", scale = "response", line = list (col = "black"), fill = list (col = "magenta"))
The results above show that among the minority (Blacks & Asians) and the majority classes (Whites), minorities tend to be limited in some way because of difficulty remembering or experiencing periods of confusion.
visreg(m1, "Sex", by = "Race", scale = "response")
The results above confirm that regardless of sex, when grouped by race, men still run a greater risk than women of not remembering/ experiencing periods of confusion.
visreg(m1, "Sex", by = "MaritalStat", scale = "response", line = list (col = "orange"), fill = list (col = "blue"))
The above results show that respondents that are widowed or separated have a greater chance of being limited in some way due to difficulty remembering or experiencing periods of confusion. Those respondents that are married tend to remember more and don’t experience periods of confusion. If respondents are widowed and male, they run a high risk of difficulty remembering/ experiencing periods of confusion.
visreg(m1, "Sex", by = "Age", scale = "response", line = list (col = "purple"), fill = list (col = "black"))
The results show a close margin of difficulty remembering between 53 year old males and 70 year old women. In other words, a woman in her 70s has about the same memory level as a man in his 50s.
visreg(m1, "Race", by = "Depress_Anx", scale = "response", line = list (col = "salmon"), fill = list (col = "black"))
The results show a close margin of difficulty remembering between a chronically depressed white person and a non-chronically depressed Asian person.
CONCLUSION
In conclusion to answer my hypotheses, I was right in guessing that when referring to the sexes, women have much greater memory than men. In terms of race, minorities do in fact have a difficult time remembering than the majority. Age definitely plays a factor when it comes to remembering, the older one is, the more difficulty they experience remembering. Married respondents proved that they have the best memory of all showing that having a partner aids in one’s rememberance as opposed to not having a partner. Lastly, chronically depressed people, regardless of race, age or sex, experience high levels of difficulty in remembering or experiencing periods of confusion. The AIC & BIC criterion were used and the best fit model proved to be the second one. This model showed that the more variables that were added to the analysis, the better the results in determining the effect of the DV: Memory loss/confusion on respondents based on race, gender, sex, marital status, age and chronic depression. The respondent that should have the least difficulty remembering and experiencing confusion is a married white woman and the person that should have the greatest difficulty remembering and experiencing confusion is a widowed black man