## Loading required package: Matrix
## Loading required package: mvtnorm
## Loading required package: TH.data
## Warning: number of observations <= rank(Z); variance-covariance matrix
## will be unidentifiable
##
## Simultaneous Tests for General Linear Hypotheses
##
## Fit: lmer(formula = log(TrailsAtestSec) ~ Age + IPVstatus + PovStat +
## Sex + CES1 + (Age | HNDid) + (1 | subclass) + Age:IPVstatus +
## Age:PovStat + Age:Sex + Age:CES1 + IPVstatus:PovStat + IPVstatus:Sex +
## IPVstatus:CES1 + PovStat:Sex + PovStat:CES1 + Sex:CES1 +
## Age:IPVstatus:PovStat + Age:IPVstatus:Sex + Age:IPVstatus:CES1 +
## Age:PovStat:Sex + Age:Sex:CES1 + IPVstatus:PovStat:Sex +
## IPVstatus:Sex:CES1 + PovStat:Sex:CES1 + Age:IPVstatus:PovStat:Sex +
## Age:IPVstatus:Sex:CES1, data = IPVandCognitionDataSet2, na.action = na.omit)
##
## Linear Hypotheses:
## Estimate Std. Error z value
## (Intercept) == 0 3.33888 0.15151 22.04
## Age == 0 0.01541 0.01058 1.46
## IPVstatus1 == 0 0.52046 0.27764 1.87
## PovStatBelow == 0 0.06531 0.22812 0.29
## SexMen == 0 0.04786 0.20260 0.24
## CES11 == 0 0.56162 0.21589 2.60
## Age:IPVstatus1 == 0 0.04911 0.02308 2.13
## Age:PovStatBelow == 0 -0.02151 0.01582 -1.36
## Age:SexMen == 0 -0.00831 0.01538 -0.54
## Age:CES11 == 0 0.02193 0.01553 1.41
## IPVstatus1:PovStatBelow == 0 1.11844 0.43889 2.55
## IPVstatus1:SexMen == 0 -0.50893 0.59436 -0.86
## IPVstatus1:CES11 == 0 -1.12804 0.36396 -3.10
## PovStatBelow:SexMen == 0 0.31044 0.33102 0.94
## PovStatBelow:CES11 == 0 -0.43739 0.16015 -2.73
## SexMen:CES11 == 0 -0.86284 0.36807 -2.34
## Age:IPVstatus1:PovStatBelow == 0 0.11210 0.03810 2.94
## Age:IPVstatus1:SexMen == 0 -0.06167 0.04061 -1.52
## Age:IPVstatus1:CES11 == 0 -0.10191 0.02999 -3.40
## Age:PovStatBelow:SexMen == 0 0.02842 0.02713 1.05
## Age:SexMen:CES11 == 0 -0.03213 0.03002 -1.07
## IPVstatus1:PovStatBelow:SexMen == 0 -1.02604 0.63179 -1.62
## IPVstatus1:SexMen:CES11 == 0 1.50363 0.58314 2.58
## PovStatBelow:SexMen:CES11 == 0 0.59532 0.36539 1.63
## Age:IPVstatus1:PovStatBelow:SexMen == 0 -0.08707 0.05190 -1.68
## Age:IPVstatus1:SexMen:CES11 == 0 0.15271 0.04701 3.25
## Pr(>|z|)
## (Intercept) == 0 < 2e-16
## Age == 0 0.14498
## IPVstatus1 == 0 0.06085
## PovStatBelow == 0 0.77464
## SexMen == 0 0.81324
## CES11 == 0 0.00928
## Age:IPVstatus1 == 0 0.03337
## Age:PovStatBelow == 0 0.17382
## Age:SexMen == 0 0.58884
## Age:CES11 == 0 0.15774
## IPVstatus1:PovStatBelow == 0 0.01082
## IPVstatus1:SexMen == 0 0.39185
## IPVstatus1:CES11 == 0 0.00194
## PovStatBelow:SexMen == 0 0.34833
## PovStatBelow:CES11 == 0 0.00631
## SexMen:CES11 == 0 0.01907
## Age:IPVstatus1:PovStatBelow == 0 0.00326
## Age:IPVstatus1:SexMen == 0 0.12883
## Age:IPVstatus1:CES11 == 0 0.00068
## Age:PovStatBelow:SexMen == 0 0.29474
## Age:SexMen:CES11 == 0 0.28449
## IPVstatus1:PovStatBelow:SexMen == 0 0.10437
## IPVstatus1:SexMen:CES11 == 0 0.00992
## PovStatBelow:SexMen:CES11 == 0 0.10325
## Age:IPVstatus1:PovStatBelow:SexMen == 0 0.09343
## Age:IPVstatus1:SexMen:CES11 == 0 0.00116
## (Univariate p values reported)
Age/IPV/Sex/Depression (Stratified by Gender)
hatIPVcog1 = zMixHat(IPVandCognitionDataSet2, mm2, vary = "Age=pAge, CES1=zQ(0,1),IPVstatus=zQ(0,1),Sex=zQ(Women,Men)",
fixedCov = "PovStat")
head(hatIPVcog1)
## Age CES1 IPVstatus Sex log TrailsAtestSec PovStat hat
## 1 30 0 0 Women 0 0 0.3333 3.608
## 2 31 0 0 Women 0 0 0.3333 3.616
## 3 32 0 0 Women 0 0 0.3333 3.624
## 4 33 0 0 Women 0 0 0.3333 3.633
## 5 34 0 0 Women 0 0 0.3333 3.641
## 6 35 0 0 Women 0 0 0.3333 3.649
par(mar = c(2, 2, 0.5, 0.5), las = 1, lwd = 2, mfrow = c(1, 2))
HNDcolors = HNDpltColors()
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"0", ], plot(pAge, hat, lty = 1, col = "black", type = "l", ylim = c(1,
12), ylab = "log(Trails A)", yaxt = "n", xlab = "Age", xaxt = "n", lwd = 1.5))
axis(1, cex.axis = 0.8)
axis(2, cex.axis = 0.8)
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 2, col = "black", lwd = 1.5))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 3, col = "black", lwd = 1.5))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 4, col = "black", lwd = 1.5))
legend(30, 12, zQ(DepressednoIPV, DepressedIPV, NonDepressednoIPV, NonDepressedIPV),
lty = 1:4, col = "black", cex = 0.75, bty = "n")
text(30, 2, "Women", adj = c(0, 0), col = "black", cex = 0.8)
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"0", ], plot(pAge, hat, lty = 1, col = "black", typ = "l", ylim = c(1, 12),
ylab = "Trails A", yaxt = "n", xlab = "Age", xaxt = "n", lwd = 1.5))
axis(1, cex.axis = 0.8)
axis(2, cex.axis = 0.8)
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 2, col = "black", lwd = 1.5))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 3, col = "black", lwd = 1.5))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 4, col = "black", lwd = 1.5))
legend(30, 12, zQ(DepressednoIPV, DepressedIPV, NonDepressednoIPV, NonDepressedIPV),
lty = 1:4, col = "black", cex = 0.75, bty = "n")
text(30, 2, "Men", adj = c(0, 0), col = "black", cex = 0.8)
Age/IPV/Sex/Depression (Gender indicated by color of lines)
hatIPVcog1 = zMixHat(IPVandCognitionDataSet2, mm2, vary = "Age=pAge, CES1=zQ(0,1),IPVstatus=zQ(0,1),Sex=zQ(Women,Men)",
fixedCov = "PovStat")
head(hatIPVcog1)
## Age CES1 IPVstatus Sex log TrailsAtestSec PovStat hat
## 1 30 0 0 Women 0 0 0.3333 3.608
## 2 31 0 0 Women 0 0 0.3333 3.616
## 3 32 0 0 Women 0 0 0.3333 3.624
## 4 33 0 0 Women 0 0 0.3333 3.633
## 5 34 0 0 Women 0 0 0.3333 3.641
## 6 35 0 0 Women 0 0 0.3333 3.649
par(mar = c(4, 4, 0.5, 2), las = 1, lwd = 2)
HNDcolors = HNDpltColors()
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"0", ], plot(pAge, hat, lty = 1, col = "dimgrey", type = "l", ylim = c(1,
12), ylab = "log(Trails A)", xlab = "Age", lwd = 2))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 2, col = "dimgrey", lwd = 2))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 3, col = "dimgrey", lwd = 2))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 4, col = "dimgrey", lwd = 2))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 1, col = "black", typ = "l", ylim = c(1,
12), ylab = "Trails A", xlab = "Age", lwd = 2.5))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 2, col = "black", lwd = 2.5))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 3, col = "black", lwd = 2.5))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 4, col = "black", lwd = 2.5))
legend(30, 12, zQ(DepressednoIPV, DepressedIPV, NonDepressednoIPV, NonDepressedIPV),
lty = 1:4, col = "black", cex = 0.9, bty = "n")
text(30, 2, "Women in Gray", adj = c(0, 0), col = "dimgrey")
text(30, 1, "Men in Black", adj = c(0, 0), col = "black")
Age/IPV/Poverty
hatIPVcog1 = zMixHat(IPVandCognitionDataSet2, mm2, vary = "Age=pAge, PovStat=zQ(abovePovStat,belowPovStat),IPVstatus=zQ(0,1)",
fixedCov = c("Sex", "CES1"))
head(hatIPVcog1)
## Age PovStat IPVstatus log TrailsAtestSec Sex CES1 hat
## 1 30 abovePovStat 0 0 0 0.4286 0.4286 3.902
## 2 31 abovePovStat 0 0 0 0.4286 0.4286 3.917
## 3 32 abovePovStat 0 0 0 0.4286 0.4286 3.933
## 4 33 abovePovStat 0 0 0 0.4286 0.4286 3.948
## 5 34 abovePovStat 0 0 0 0.4286 0.4286 3.964
## 6 35 abovePovStat 0 0 0 0.4286 0.4286 3.979
par(mar = c(4, 4, 0.5, 2), las = 1, lwd = 2)
HNDcolors = HNDpltColors()
with(hatIPVcog1[hatIPVcog1$PovStat == "abovePovStat" & hatIPVcog1$IPVstatus ==
"0", ], plot(pAge, hat, lty = 1, col = "black", type = "l", ylim = c(1,
12), ylab = "log(Trails A)", xlab = "Age"))
with(hatIPVcog1[hatIPVcog1$PovStat == "abovePovStat" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 2, col = "black"))
with(hatIPVcog1[hatIPVcog1$PovStat == "belowPovStat" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 3, col = "black"))
with(hatIPVcog1[hatIPVcog1$PovStat == "belowPovStat" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 4, col = "black"))
legend(30, 12, zQ(AbovePovStatnoIPV, AbovePovStatIPV, BelowPovStatnoIPV, belowPovStatIPV),
lty = 1:4, col = "black", cex = 0.95, bty = "n")
Age/IPV/Poverty (IPV status indicated by color of lines)
hatIPVcog1 = zMixHat(IPVandCognitionDataSet2, mm2, vary = "Age=pAge, PovStat=zQ(abovePovStat,belowPovStat),IPVstatus=zQ(0,1)",
fixedCov = c("Sex", "CES1"))
head(hatIPVcog1)
## Age PovStat IPVstatus log TrailsAtestSec Sex CES1 hat
## 1 30 abovePovStat 0 0 0 0.4286 0.4286 3.902
## 2 31 abovePovStat 0 0 0 0.4286 0.4286 3.917
## 3 32 abovePovStat 0 0 0 0.4286 0.4286 3.933
## 4 33 abovePovStat 0 0 0 0.4286 0.4286 3.948
## 5 34 abovePovStat 0 0 0 0.4286 0.4286 3.964
## 6 35 abovePovStat 0 0 0 0.4286 0.4286 3.979
par(mar = c(4, 4, 0.5, 2), las = 1, lwd = 2)
HNDcolors = HNDpltColors()
with(hatIPVcog1[hatIPVcog1$PovStat == "abovePovStat" & hatIPVcog1$IPVstatus ==
"0", ], plot(pAge, hat, lty = 1, col = "dimgrey", type = "l", ylim = c(1,
12), ylab = "log(Trails A)", xlab = "Age"))
with(hatIPVcog1[hatIPVcog1$PovStat == "abovePovStat" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 2, col = "black"))
with(hatIPVcog1[hatIPVcog1$PovStat == "belowPovStat" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 3, col = "dimgrey"))
with(hatIPVcog1[hatIPVcog1$PovStat == "belowPovStat" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 4, col = "black"))
legend(30, 12, zQ(AbovePovStatnoIPV, AbovePovStatIPV, BelowPovStatnoIPV, belowPovStatIPV),
lty = 1:4, col = "black", cex = 0.95, bty = "n")
text(30, 2, "IPV in Black", adj = c(0, 0), col = "black", cex = 0.95)
text(30, 1, "No IPV in Gray", adj = c(0, 0), col = "dimgrey", cex = 0.95)