Clock Total Regression Model 1
load("~/Desktop/Megan/Research/IPV and Cognition Paper/IPV R Output/IPVandCognitionDataSet2.rda")
library(lme4)
## Loading required package: Matrix
library(lmerTest)
## KernSmooth 2.23 loaded
## Copyright M. P. Wand 1997-2009
##
## Attaching package: 'lmerTest'
##
## The following object is masked from 'package:lme4':
##
## lmer
##
## The following object is masked from 'package:stats':
##
## step
(mm1 = lmer(BinaryClocks ~ (Age + IPVstatus + Sex + PovStat)^4 + (Age | HNDid) +
(1 | subclass), data = IPVandCognitionDataSet2))
## Warning: number of observations <= rank(Z); variance-covariance matrix
## will be unidentifiable
## Linear mixed model fit by REML ['merModLmerTest']
## Formula: BinaryClocks ~ (Age + IPVstatus + Sex + PovStat)^4 + (Age | HNDid) + (1 | subclass)
## Data: IPVandCognitionDataSet2
## REML criterion at convergence: 198.1
## Random effects:
## Groups Name Std.Dev. Corr
## HNDid (Intercept) 0.2690
## Age 0.0168 1.00
## subclass (Intercept) 0.2049
## Residual 0.3780
## Number of obs: 126, groups: HNDid, 63; subclass, 21
## Fixed Effects:
## (Intercept) Age
## 1.56668 -0.00605
## IPVstatus1 SexMen
## 0.07766 0.30672
## PovStatBelow Age:IPVstatus1
## 0.16039 -0.00468
## Age:SexMen Age:PovStatBelow
## 0.01006 0.02360
## IPVstatus1:SexMen IPVstatus1:PovStatBelow
## -0.74214 -0.86023
## SexMen:PovStatBelow Age:IPVstatus1:SexMen
## -0.31597 -0.03714
## Age:IPVstatus1:PovStatBelow Age:SexMen:PovStatBelow
## -0.08988 -0.03950
## IPVstatus1:SexMen:PovStatBelow Age:IPVstatus1:SexMen:PovStatBelow
## 1.49279 0.14653
summary(mm1)
## Warning: number of observations <= rank(Z); variance-covariance matrix will be unidentifiable
## Warning: number of observations <= rank(Z); variance-covariance matrix will be unidentifiable
## Linear mixed model fit by REML ['merModLmerTest']
## Formula: BinaryClocks ~ (Age + IPVstatus + Sex + PovStat)^4 + (Age | HNDid) + (1 | subclass)
## Data: IPVandCognitionDataSet2
##
## REML criterion at convergence: 198.1
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## HNDid (Intercept) 0.072359 0.2690
## Age 0.000281 0.0168 1.00
## subclass (Intercept) 0.041986 0.2049
## Residual 0.142899 0.3780
## Number of obs: 126, groups: HNDid, 63; subclass, 21
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 1.56668 0.17225 23.20000 9.10
## Age -0.00605 0.01366 33.20000 -0.44
## IPVstatus1 0.07766 0.26480 22.20000 0.29
## SexMen 0.30672 0.25779 21.60000 1.19
## PovStatBelow 0.16039 0.28774 11.80000 0.56
## Age:IPVstatus1 -0.00468 0.02446 41.50000 -0.19
## Age:SexMen 0.01006 0.02171 30.40000 0.46
## Age:PovStatBelow 0.02360 0.02332 12.30000 1.01
## IPVstatus1:SexMen -0.74214 0.43975 26.80000 -1.69
## IPVstatus1:PovStatBelow -0.86023 0.60814 36.60000 -1.41
## SexMen:PovStatBelow -0.31597 0.38390 12.70000 -0.82
## Age:IPVstatus1:SexMen -0.03714 0.04006 49.50000 -0.93
## Age:IPVstatus1:PovStatBelow -0.08988 0.05952 68.00000 -1.51
## Age:SexMen:PovStatBelow -0.03950 0.04110 16.20000 -0.96
## IPVstatus1:SexMen:PovStatBelow 1.49279 0.75614 28.30000 1.97
## Age:IPVstatus1:SexMen:PovStatBelow 0.14653 0.07655 47.40000 1.91
## Pr(>|t|)
## (Intercept) 4.1e-09
## Age 0.661
## IPVstatus1 0.772
## SexMen 0.247
## PovStatBelow 0.588
## Age:IPVstatus1 0.849
## Age:SexMen 0.646
## Age:PovStatBelow 0.331
## IPVstatus1:SexMen 0.103
## IPVstatus1:PovStatBelow 0.166
## SexMen:PovStatBelow 0.426
## Age:IPVstatus1:SexMen 0.358
## Age:IPVstatus1:PovStatBelow 0.136
## Age:SexMen:PovStatBelow 0.351
## IPVstatus1:SexMen:PovStatBelow 0.058
## Age:IPVstatus1:SexMen:PovStatBelow 0.062
##
## Correlation of Fixed Effects:
## (Intr) Age IPVst1 SexMen PvSttB Ag:IPV1 Ag:SxM Ag:PSB
## Age 0.830
## IPVstatus1 -0.593 -0.508
## SexMen -0.625 -0.524 0.387
## PovStatBelw -0.589 -0.505 0.400 0.382
## Ag:IPVstts1 -0.444 -0.504 0.853 0.280 0.304
## Age:SexMen -0.498 -0.573 0.305 0.881 0.293 0.302
## Ag:PvSttBlw -0.482 -0.574 0.329 0.303 0.825 0.332 0.326
## IPVstts1:SM 0.352 0.309 -0.602 -0.530 -0.232 -0.514 -0.474 -0.201
## IPVstt1:PSB 0.328 0.264 -0.499 -0.218 -0.523 -0.413 -0.154 -0.420
## SxMn:PvSttB 0.439 0.369 -0.267 -0.670 -0.735 -0.192 -0.582 -0.593
## Ag:IPVs1:SM 0.272 0.320 -0.520 -0.449 -0.177 -0.620 -0.519 -0.208
## Ag:IPV1:PSB 0.218 0.241 -0.386 -0.133 -0.356 -0.444 -0.129 -0.418
## Ag:SxMn:PSB 0.264 0.300 -0.143 -0.484 -0.427 -0.145 -0.536 -0.518
## IPV1:SM:PSB -0.258 -0.209 0.382 0.351 0.417 0.313 0.291 0.328
## A:IPV1:SM:P -0.166 -0.189 0.277 0.263 0.253 0.329 0.282 0.332
## IPVs1:SM IPV1:P SM:PSB Ag:IPV1:SM A:IPV1:P A:SM:P IPV1:SM:
## Age
## IPVstatus1
## SexMen
## PovStatBelw
## Ag:IPVstts1
## Age:SexMen
## Ag:PvSttBlw
## IPVstts1:SM
## IPVstt1:PSB 0.297
## SxMn:PvSttB 0.366 0.372
## Ag:IPVs1:SM 0.867 0.246 0.304
## Ag:IPV1:PSB 0.230 0.880 0.241 0.268
## Ag:SxMn:PSB 0.232 0.203 0.657 0.262 0.199
## IPV1:SM:PSB -0.609 -0.795 -0.527 -0.515 -0.696 -0.318
## A:IPV1:SM:P -0.454 -0.663 -0.356 -0.521 -0.770 -0.540 0.778
plot(st)
## Error: object 'st' not found
plot(mm1)
Clock Total Regression Model 2 (with CES)
load("~/Desktop/Megan/Research/IPV and Cognition Paper/IPV R Output/IPVandCognitionDataSet2.rda")
library(lme4)
library(lmerTest)
(mm2 = lmer(BinaryClocks ~ (Age + IPVstatus + Sex + PovStat + CES1)^5 + (Age |
HNDid) + (1 | subclass), data = IPVandCognitionDataSet2))
## Warning: number of observations <= rank(Z); variance-covariance matrix
## will be unidentifiable
## Linear mixed model fit by REML ['merModLmerTest']
## Formula: BinaryClocks ~ (Age + IPVstatus + Sex + PovStat + CES1)^5 + (Age | HNDid) + (1 | subclass)
## Data: IPVandCognitionDataSet2
## REML criterion at convergence: 216.2
## Random effects:
## Groups Name Std.Dev. Corr
## HNDid (Intercept) 0.2033
## Age 0.0107 1.00
## subclass (Intercept) 0.2367
## Residual 0.3807
## Number of obs: 126, groups: HNDid, 63; subclass, 21
## Fixed Effects:
## (Intercept)
## 1.5057
## Age
## -0.0197
## IPVstatus1
## -0.4141
## SexMen
## 0.4726
## PovStatBelow
## 0.0541
## CES11
## 0.3206
## Age:IPVstatus1
## -0.0453
## Age:SexMen
## 0.0330
## Age:PovStatBelow
## 0.0214
## Age:CES11
## 0.0463
## IPVstatus1:SexMen
## 0.3677
## IPVstatus1:PovStatBelow
## -1.7406
## IPVstatus1:CES11
## 0.4663
## SexMen:PovStatBelow
## -0.2768
## SexMen:CES11
## -0.9412
## PovStatBelow:CES11
## -0.1703
## Age:IPVstatus1:SexMen
## 0.0321
## Age:IPVstatus1:PovStatBelow
## -0.1564
## Age:IPVstatus1:CES11
## 0.0332
## Age:SexMen:PovStatBelow
## -0.0710
## Age:SexMen:CES11
## -0.1057
## Age:PovStatBelow:CES11
## -0.0245
## IPVstatus1:SexMen:PovStatBelow
## 1.8408
## IPVstatus1:SexMen:CES11
## -0.5670
## IPVstatus1:PovStatBelow:CES11
## 1.2381
## SexMen:PovStatBelow:CES11
## 1.0246
## Age:IPVstatus1:SexMen:PovStatBelow
## 0.2126
## Age:IPVstatus1:SexMen:CES11
## -0.0103
## Age:IPVstatus1:PovStatBelow:CES11
## 0.0922
## Age:SexMen:PovStatBelow:CES11
## 0.2526
## IPVstatus1:SexMen:PovStatBelow:CES11
## -1.6126
## Age:IPVstatus1:SexMen:PovStatBelow:CES11
## -0.2385
summary(mm2)
## Warning: number of observations <= rank(Z); variance-covariance matrix will be unidentifiable
## Warning: number of observations <= rank(Z); variance-covariance matrix will be unidentifiable
## Linear mixed model fit by REML ['merModLmerTest']
## Formula: BinaryClocks ~ (Age + IPVstatus + Sex + PovStat + CES1)^5 + (Age | HNDid) + (1 | subclass)
## Data: IPVandCognitionDataSet2
##
## REML criterion at convergence: 216.2
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## HNDid (Intercept) 0.041314 0.2033
## Age 0.000114 0.0107 1.00
## subclass (Intercept) 0.056013 0.2367
## Residual 0.144941 0.3807
## Number of obs: 126, groups: HNDid, 63; subclass, 21
##
## Fixed effects:
## Estimate Std. Error df
## (Intercept) 1.5057 0.2001 9.1000
## Age -0.0197 0.0159 14.3000
## IPVstatus1 -0.4141 0.4305 38.3000
## SexMen 0.4726 0.2713 6.9000
## PovStatBelow 0.0541 0.4685 35.2000
## CES11 0.3206 0.3145 19.5000
## Age:IPVstatus1 -0.0453 0.0407 76.1000
## Age:SexMen 0.0330 0.0226 10.4000
## Age:PovStatBelow 0.0214 0.0421 63.9000
## Age:CES11 0.0463 0.0281 49.4000
## IPVstatus1:SexMen 0.3677 2.3677 63.3000
## IPVstatus1:PovStatBelow -1.7406 1.3368 79.6000
## IPVstatus1:CES11 0.4663 0.5628 30.6000
## SexMen:PovStatBelow -0.2768 0.5415 22.9000
## SexMen:CES11 -0.9412 0.6139 42.3000
## PovStatBelow:CES11 -0.1703 0.5946 19.9000
## Age:IPVstatus1:SexMen 0.0321 0.1420 62.1000
## Age:IPVstatus1:PovStatBelow -0.1564 0.1215 67.8000
## Age:IPVstatus1:CES11 0.0332 0.0524 61.6000
## Age:SexMen:PovStatBelow -0.0710 0.0541 27.1000
## Age:SexMen:CES11 -0.1057 0.0606 80.0000
## Age:PovStatBelow:CES11 -0.0245 0.0508 36.3000
## IPVstatus1:SexMen:PovStatBelow 1.8408 2.7132 69.4000
## IPVstatus1:SexMen:CES11 -0.5670 2.4617 69.4000
## IPVstatus1:PovStatBelow:CES11 1.2381 1.5074 75.1000
## SexMen:PovStatBelow:CES11 1.0246 0.8951 30.0000
## Age:IPVstatus1:SexMen:PovStatBelow 0.2126 0.1869 65.9000
## Age:IPVstatus1:SexMen:CES11 -0.0103 0.1596 71.8000
## Age:IPVstatus1:PovStatBelow:CES11 0.0922 0.1420 80.1000
## Age:SexMen:PovStatBelow:CES11 0.2526 0.1140 72.8000
## IPVstatus1:SexMen:PovStatBelow:CES11 -1.6126 2.8873 76.6000
## Age:IPVstatus1:SexMen:PovStatBelow:CES11 -0.2385 0.2363 74.6000
## t value Pr(>|t|)
## (Intercept) 7.52 3.5e-05
## Age -1.24 0.235
## IPVstatus1 -0.96 0.342
## SexMen 1.74 0.126
## PovStatBelow 0.12 0.909
## CES11 1.02 0.320
## Age:IPVstatus1 -1.11 0.268
## Age:SexMen 1.46 0.174
## Age:PovStatBelow 0.51 0.612
## Age:CES11 1.65 0.105
## IPVstatus1:SexMen 0.16 0.877
## IPVstatus1:PovStatBelow -1.30 0.197
## IPVstatus1:CES11 0.83 0.414
## SexMen:PovStatBelow -0.51 0.614
## SexMen:CES11 -1.53 0.133
## PovStatBelow:CES11 -0.29 0.778
## Age:IPVstatus1:SexMen 0.23 0.822
## Age:IPVstatus1:PovStatBelow -1.29 0.203
## Age:IPVstatus1:CES11 0.63 0.528
## Age:SexMen:PovStatBelow -1.31 0.200
## Age:SexMen:CES11 -1.74 0.085
## Age:PovStatBelow:CES11 -0.48 0.633
## IPVstatus1:SexMen:PovStatBelow 0.68 0.500
## IPVstatus1:SexMen:CES11 -0.23 0.819
## IPVstatus1:PovStatBelow:CES11 0.82 0.414
## SexMen:PovStatBelow:CES11 1.14 0.261
## Age:IPVstatus1:SexMen:PovStatBelow 1.14 0.259
## Age:IPVstatus1:SexMen:CES11 -0.06 0.949
## Age:IPVstatus1:PovStatBelow:CES11 0.65 0.518
## Age:SexMen:PovStatBelow:CES11 2.22 0.030
## IPVstatus1:SexMen:PovStatBelow:CES11 -0.56 0.578
## Age:IPVstatus1:SexMen:PovStatBelow:CES11 -1.01 0.316
##
## Correlation matrix not shown by default, as p = 32 > 20.
## Use print(x, correlation=TRUE) or
## vcov(x) if you need it
Eliminate Non-significant Terms for Model 2
(mm2 = lmer(BinaryClocks ~ (Age + Sex + PovStat + CES1)^4 + (Age | HNDid) +
(1 | subclass), data = IPVandCognitionDataSet2))
## Warning: number of observations <= rank(Z); variance-covariance matrix
## will be unidentifiable
## Linear mixed model fit by REML ['merModLmerTest']
## Formula: BinaryClocks ~ (Age + Sex + PovStat + CES1)^4 + (Age | HNDid) + (1 | subclass)
## Data: IPVandCognitionDataSet2
## REML criterion at convergence: 192.1
## Random effects:
## Groups Name Std.Dev. Corr
## HNDid (Intercept) 0.1547
## Age 0.0106 1.00
## subclass (Intercept) 0.2640
## Residual 0.3698
## Number of obs: 126, groups: HNDid, 63; subclass, 21
## Fixed Effects:
## (Intercept) Age
## 1.47536 -0.02184
## SexMen PovStatBelow
## 0.50890 -0.12635
## CES11 Age:SexMen
## 0.39283 0.03458
## Age:PovStatBelow Age:CES11
## -0.00112 0.04767
## SexMen:PovStatBelow SexMen:CES11
## -0.10413 -1.15570
## PovStatBelow:CES11 Age:SexMen:PovStatBelow
## 0.01669 -0.02378
## Age:SexMen:CES11 Age:PovStatBelow:CES11
## -0.10459 -0.00531
## SexMen:PovStatBelow:CES11 Age:SexMen:PovStatBelow:CES11
## 0.66552 0.14711
(summary(mm2))
## Warning: number of observations <= rank(Z); variance-covariance matrix will be unidentifiable
## Warning: number of observations <= rank(Z); variance-covariance matrix will be unidentifiable
## Linear mixed model fit by REML ['merModLmerTest']
## Formula: BinaryClocks ~ (Age + Sex + PovStat + CES1)^4 + (Age | HNDid) + (1 | subclass)
## Data: IPVandCognitionDataSet2
##
## REML criterion at convergence: 192.1
##
## Random effects:
## Groups Name Variance Std.Dev. Corr
## HNDid (Intercept) 0.023939 0.1547
## Age 0.000112 0.0106 1.00
## subclass (Intercept) 0.069717 0.2640
## Residual 0.136754 0.3698
## Number of obs: 126, groups: HNDid, 63; subclass, 21
##
## Fixed effects:
## Estimate Std. Error df t value
## (Intercept) 1.47536 0.16539 23.70000 8.92
## Age -0.02184 0.01416 32.10000 -1.54
## SexMen 0.50890 0.22896 14.40000 2.22
## PovStatBelow -0.12635 0.41124 65.30000 -0.31
## CES11 0.39283 0.21427 23.00000 1.83
## Age:SexMen 0.03458 0.01931 19.00000 1.79
## Age:PovStatBelow -0.00112 0.03788 88.60000 -0.03
## Age:CES11 0.04767 0.02143 49.80000 2.22
## SexMen:PovStatBelow -0.10413 0.46803 44.90000 -0.22
## SexMen:CES11 -1.15570 0.37369 27.80000 -3.09
## PovStatBelow:CES11 0.01669 0.47110 36.20000 0.04
## Age:SexMen:PovStatBelow -0.02378 0.04275 63.20000 -0.56
## Age:SexMen:CES11 -0.10459 0.03777 56.00000 -2.77
## Age:PovStatBelow:CES11 -0.00531 0.04288 49.70000 -0.12
## SexMen:PovStatBelow:CES11 0.66552 0.63039 36.90000 1.06
## Age:SexMen:PovStatBelow:CES11 0.14711 0.07401 74.70000 1.99
## Pr(>|t|)
## (Intercept) 4.8e-09
## Age 0.1326
## SexMen 0.0427
## PovStatBelow 0.7596
## CES11 0.0797
## Age:SexMen 0.0892
## Age:PovStatBelow 0.9766
## Age:CES11 0.0307
## SexMen:PovStatBelow 0.8249
## SexMen:CES11 0.0045
## PovStatBelow:CES11 0.9719
## Age:SexMen:PovStatBelow 0.5801
## Age:SexMen:CES11 0.0076
## Age:PovStatBelow:CES11 0.9019
## SexMen:PovStatBelow:CES11 0.2980
## Age:SexMen:PovStatBelow:CES11 0.0505
##
## Correlation of Fixed Effects:
## (Intr) Age SexMen PvSttB CES11 Ag:SxM Ag:PSB A:CES1
## Age 0.760
## SexMen -0.556 -0.434
## PovStatBelw -0.369 -0.310 0.232
## CES11 -0.635 -0.559 0.378 0.249
## Age:SexMen -0.462 -0.580 0.843 0.166 0.338
## Ag:PvSttBlw -0.296 -0.378 0.181 0.915 0.222 0.215
## Age:CES11 -0.443 -0.638 0.249 0.185 0.778 0.378 0.252
## SxMn:PvSttB 0.274 0.216 -0.483 -0.865 -0.157 -0.384 -0.791 -0.103
## SexMn:CES11 0.295 0.269 -0.535 -0.116 -0.533 -0.472 -0.124 -0.414
## PvStB:CES11 0.299 0.266 -0.192 -0.868 -0.417 -0.143 -0.803 -0.354
## Ag:SxMn:PSB 0.227 0.269 -0.395 -0.781 -0.133 -0.448 -0.836 -0.145
## Ag:SM:CES11 0.221 0.337 -0.371 -0.084 -0.423 -0.479 -0.134 -0.547
## A:PSB:CES11 0.241 0.328 -0.146 -0.799 -0.364 -0.188 -0.872 -0.456
## SM:PSB:CES1 -0.147 -0.130 0.324 0.650 0.251 0.256 0.613 0.213
## A:SM:PSB:CE -0.136 -0.185 0.202 0.503 0.179 0.239 0.531 0.229
## SxM:PSB SM:CES PSB:CE Ag:SM:PSB A:SM:C A:PSB: SM:PSB:
## Age
## SexMen
## PovStatBelw
## CES11
## Age:SexMen
## Ag:PvSttBlw
## Age:CES11
## SxMn:PvSttB
## SexMn:CES11 0.263
## PvStB:CES11 0.753 0.220
## Ag:SxMn:PSB 0.850 0.202 0.681
## Ag:SM:CES11 0.176 0.838 0.184 0.199
## A:PSB:CES11 0.690 0.202 0.878 0.742 0.249
## SM:PSB:CES1 -0.764 -0.586 -0.756 -0.636 -0.490 -0.669
## A:SM:PSB:CE -0.539 -0.403 -0.539 -0.616 -0.478 -0.606 0.687