## 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
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 = "red", type = "l", ylim = c(1, 12),
ylab = "log(Trails A)", xlab = "Age"))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 2, col = "red"))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 3, col = "red"))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 4, col = "red"))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 1, col = "blue", typ = "l", ylim = c(1, 12),
ylab = "Trails A", xlab = "Age"))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 2, col = "blue"))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"0", ], lines(pAge, hat, lty = 3, col = "blue"))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus ==
"1", ], lines(pAge, hat, lty = 4, col = "blue"))
legend(30, 12, zQ(DepressednoIPV, DepressedIPV, nonDepressednoIPV, nonDepressedIPV),
lty = 1:4, col = "black", cex = 0.9, bty = "n")
text(30, 2, "Women in red", adj = c(0, 0), col = "red")
text(30, 1, "Men in blue", adj = c(0, 0), col = "blue")
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 = "red"))
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 = "red"))
legend(30, 12, zQ(AbovePovStatnoIPV, AbovePovStatIPV, BelowPovStatnoIPV, belowPovStatIPV),
lty = 1:4, col = "black", cex = 0.95, bty = "n")
text(30, 1.5, "IPV in red", adj = c(0, 0), col = "red", cex = 0.95)
text(30, 1, "No IPV in black", adj = c(0, 0), col = "black", cex = 0.95)
Age/IPV/Depression
hatIPVcog1 = zMixHat(IPVandCognitionDataSet2, mm2, vary = "Age=pAge, CES1=zQ(0,1),IPVstatus=zQ(0,1)",
fixedCov = c("Sex", "PovStat"))
head(hatIPVcog1)
## Age CES1 IPVstatus log TrailsAtestSec Sex PovStat hat
## 1 30 0 0 0 0 0.4286 0.3333 3.688
## 2 31 0 0 0 0 0.4286 0.3333 3.696
## 3 32 0 0 0 0 0.4286 0.3333 3.705
## 4 33 0 0 0 0 0.4286 0.3333 3.714
## 5 34 0 0 0 0 0.4286 0.3333 3.723
## 6 35 0 0 0 0 0.4286 0.3333 3.731
par(mar = c(4, 4, 0.5, 2), las = 1, lwd = 2)
HNDcolors = HNDpltColors()
with(hatIPVcog1[hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus == "0", ], plot(pAge,
hat, lty = 1, col = "black", type = "l", ylim = c(1, 8), ylab = "log(Trails A)",
xlab = "Age"))
with(hatIPVcog1[hatIPVcog1$CES1 == "0" & hatIPVcog1$IPVstatus == "1", ], lines(pAge,
hat, lty = 2, col = "red"))
with(hatIPVcog1[hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus == "0", ], lines(pAge,
hat, lty = 3, col = "black"))
with(hatIPVcog1[hatIPVcog1$CES1 == "1" & hatIPVcog1$IPVstatus == "1", ], lines(pAge,
hat, lty = 4, col = "red"))
legend(30, 8, zQ(nonDepressednoIPV, nonDepressedIPV, DepressednoIPV, DepressedIPV),
lty = 1:4, col = "black", cex = 0.95)
text(30, 1.5, "IPV in red", adj = c(0, 0), col = "red", cex = 0.95)
text(30, 1, "No IPV in black", adj = c(0, 0), col = "black", cex = 0.95)
IPV/Sex/Depression
pCES1 = (c(0, 1))
hatIPVcog1 = zMixHat(IPVandCognitionDataSet2, mm2, vary = "CES1=pCES1,IPVstatus=zQ(0,1),Sex=zQ(Women,Men)",
fixedCov = c("PovStat", "Age"))
head(hatIPVcog1)
## CES1 IPVstatus Sex log TrailsAtestSec PovStat Age hat
## 1 0 0 Women 0 0 0.3333 -7.111 3.302
## 2 1 0 Women 0 0 0.3333 -7.111 3.562
## 3 0 1 Women 0 0 0.3333 -7.111 3.580
## 4 1 1 Women 0 0 0.3333 -7.111 3.437
## 5 0 0 Men 0 0 0.3333 -7.111 3.445
## 6 1 0 Men 0 0 0.3333 -7.111 3.269
par(mar = c(4, 4, 0.5, 2), las = 1, lwd = 2)
HNDcolors = HNDpltColors()
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$IPVstatus == "0", ],
plot(CES1, hat, lty = 1, col = "red", type = "l", ylim = c(3, 4), ylab = "log(Trails A)",
xlab = "Depression"))
with(hatIPVcog1[hatIPVcog1$Sex == "Women" & hatIPVcog1$IPVstatus == "1", ],
lines(CES1, hat, lty = 2, col = "red"))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$IPVstatus == "0", ], lines(CES1,
hat, lty = 1, col = "blue", typ = "l", ylim = c(3, 4), ylab = "Trails A",
xlab = "Depression"))
with(hatIPVcog1[hatIPVcog1$Sex == "Men" & hatIPVcog1$IPVstatus == "1", ], lines(CES1,
hat, lty = 2, col = "blue"))
legend(0, 4, zQ(NoIPV, IPV), lty = 1:2, col = "black", cex = 0.9, bty = "n")
text(0, 3, "Women in red", adj = c(0, 0), col = "red", cex = 0.95)
text(0, 3.1, "Men in blue", adj = c(0, 0), col = "blue", cex = 0.95)