Dissertation Analyses

load(file="/Users/meganwilliams/Desktop/Dissertation/StroopMixed.rdata")
load(file="/Users/meganwilliams/Desktop/Dissertation/Allvars.rdata")
library(effects)
library(interactions)

California Verbal Learning Test (Total Correct Trial A) - Psychological Aggression

Model 1

CVLTlog1 <- glm(PsychAggress ~ CVLtca, data=Allvars,family = "binomial")
summary(CVLTlog1)
## 
## Call:
## glm(formula = PsychAggress ~ CVLtca, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2397   0.4639   0.5139   0.5604   0.7019  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  1.27530    0.28686   4.446 8.76e-06 ***
## CVLtca       0.03103    0.01435   2.162   0.0306 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 500.73  on 639  degrees of freedom
## AIC: 504.73
## 
## Number of Fisher Scoring iterations: 4
confint(CVLTlog1)
##                   2.5 %     97.5 %
## (Intercept) 0.726387845 1.85354798
## CVLtca      0.002905058 0.05927112
exp(cbind(OR = coef(CVLTlog1), confint(CVLTlog1)))
##                   OR    2.5 %   97.5 %
## (Intercept) 3.579779 2.067599 6.382424
## CVLtca      1.031512 1.002909 1.061063
plot(allEffects(CVLTlog1))

########Compare to null model 
#Difference in Deviance
with(CVLTlog1,null.deviance - deviance)
## [1] 4.674706
#Degrees of freedom for the difference between two models
with(CVLTlog1,df.null - df.residual)
## [1] 1
#p-value
with(CVLTlog1,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.03060994

Model 2

CVLTlog2 <- glm(PsychAggress ~ CVLtca + Age + Sex + PovStat + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog2)
## 
## Call:
## glm(formula = PsychAggress ~ CVLtca + Age + Sex + PovStat + WRATtotal, 
##     family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.4013   0.4156   0.4938   0.5810   0.8756  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)  
## (Intercept)   1.69988    0.96538   1.761   0.0783 .
## CVLtca        0.01946    0.01611   1.208   0.2269  
## Age          -0.01842    0.01339  -1.375   0.1690  
## SexMen       -0.37455    0.24039  -1.558   0.1192  
## PovStatBelow  0.33199    0.27315   1.215   0.2242  
## WRATtotal     0.01787    0.01537   1.162   0.2450  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 493.07  on 635  degrees of freedom
## AIC: 505.07
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog2)
##                    2.5 %      97.5 %
## (Intercept)  -0.17016237 3.622026457
## CVLtca       -0.01231726 0.050931166
## Age          -0.04485800 0.007752946
## SexMen       -0.85096655 0.094038699
## PovStatBelow -0.18985492 0.885330955
## WRATtotal    -0.01277707 0.047655994
exp(cbind(OR = coef(CVLTlog2), confint(CVLTlog2)))
##                     OR     2.5 %    97.5 %
## (Intercept)  5.4732962 0.8435278 37.413308
## CVLtca       1.0196525 0.9877583  1.052250
## Age          0.9817498 0.9561332  1.007783
## SexMen       0.6875991 0.4270020  1.098602
## PovStatBelow 1.3937334 0.8270791  2.423786
## WRATtotal    1.0180281 0.9873042  1.048810
########Compare to null model 
#Difference in Deviance
with(CVLTlog2,null.deviance - deviance)
## [1] 12.33094
#Degrees of freedom for the difference between two models
with(CVLTlog2,df.null - df.residual)
## [1] 5
#p-value
with(CVLTlog2,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.03052402

Model 3

CVLTlog3 <- glm(PsychAggress ~ (CVLtca + Sex + PovStat)^3 + Age + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog3)
## 
## Call:
## glm(formula = PsychAggress ~ (CVLtca + Sex + PovStat)^3 + Age + 
##     WRATtotal, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.3337   0.4129   0.4814   0.5690   0.9980  
## 
## Coefficients:
##                             Estimate Std. Error z value Pr(>|z|)
## (Intercept)                 1.507921   1.041509   1.448    0.148
## CVLtca                      0.032917   0.027323   1.205    0.228
## SexMen                     -0.490835   0.717735  -0.684    0.494
## PovStatBelow                1.064531   1.054751   1.009    0.313
## Age                        -0.018731   0.013525  -1.385    0.166
## WRATtotal                   0.017976   0.015501   1.160    0.246
## CVLtca:SexMen               0.002083   0.035676   0.058    0.953
## CVLtca:PovStatBelow        -0.047366   0.048002  -0.987    0.324
## SexMen:PovStatBelow         0.365349   1.389997   0.263    0.793
## CVLtca:SexMen:PovStatBelow -0.009220   0.068861  -0.134    0.893
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 490.18  on 631  degrees of freedom
## AIC: 510.18
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog3)
##                                  2.5 %      97.5 %
## (Intercept)                -0.49988121 3.595142572
## CVLtca                     -0.02103625 0.086641647
## SexMen                     -1.93022742 0.897900681
## PovStatBelow               -0.91709632 3.263924014
## Age                        -0.04543934 0.007698432
## WRATtotal                  -0.01291089 0.048037702
## CVLtca:SexMen              -0.06781452 0.072447800
## CVLtca:PovStatBelow        -0.14316689 0.046005026
## SexMen:PovStatBelow        -2.39711923 3.102579238
## CVLtca:SexMen:PovStatBelow -0.14502772 0.125832049
exp(cbind(OR = coef(CVLTlog3), confint(CVLTlog3)))
##                                   OR      2.5 %    97.5 %
## (Intercept)                4.5173308 0.60660271 36.420892
## CVLtca                     1.0334647 0.97918347  1.090506
## SexMen                     0.6121152 0.14511519  2.454445
## PovStatBelow               2.8994777 0.39967789 26.151957
## Age                        0.9814433 0.95557757  1.007728
## WRATtotal                  1.0181383 0.98717210  1.049210
## CVLtca:SexMen              1.0020853 0.93443378  1.075137
## CVLtca:PovStatBelow        0.9537384 0.86660943  1.047080
## SexMen:PovStatBelow        1.4410172 0.09097967 22.255279
## CVLtca:SexMen:PovStatBelow 0.9908219 0.86499831  1.134092
########Compare to null model 
#Difference in Deviance
with(CVLTlog3,null.deviance - deviance)
## [1] 15.22463
#Degrees of freedom for the difference between two models
with(CVLTlog3,df.null - df.residual)
## [1] 9
#p-value
with(CVLTlog3,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.08494771

Compare Models 1,2, & 3

anova(CVLTlog1,CVLTlog2,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLtca
## Model 2: PsychAggress ~ CVLtca + Age + Sex + PovStat + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       639     500.73                     
## 2       635     493.07  4   7.6562    0.105
anova(CVLTlog2,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLtca + Age + Sex + PovStat + WRATtotal
## Model 2: PsychAggress ~ (CVLtca + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       635     493.07                     
## 2       631     490.18  4   2.8937   0.5758
anova(CVLTlog1,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLtca
## Model 2: PsychAggress ~ (CVLtca + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       639     500.73                     
## 2       631     490.18  8    10.55   0.2285

Suggested Model by Predictors

anova(CVLTlog3, test="Chisq")
## Analysis of Deviance Table
## 
## Model: binomial, link: logit
## 
## Response: PsychAggress
## 
## Terms added sequentially (first to last)
## 
## 
##                    Df Deviance Resid. Df Resid. Dev Pr(>Chi)  
## NULL                                 640     505.40           
## CVLtca              1   4.6747       639     500.73  0.03061 *
## Sex                 1   2.5316       638     498.20  0.11159  
## PovStat             1   1.9644       637     496.23  0.16104  
## Age                 1   1.8340       636     494.40  0.17566  
## WRATtotal           1   1.3262       635     493.07  0.24947  
## CVLtca:Sex          1   0.0025       634     493.07  0.95979  
## CVLtca:PovStat      1   2.7495       633     490.32  0.09729 .
## Sex:PovStat         1   0.1237       632     490.19  0.72503  
## CVLtca:Sex:PovStat  1   0.0179       631     490.18  0.89346  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
CVLTlog4 <- glm(PsychAggress ~ (CVLtca + PovStat)^2, data = Allvars, family = "binomial")
summary(CVLTlog4)
## 
## Call:
## glm(formula = PsychAggress ~ (CVLtca + PovStat)^2, family = "binomial", 
##     data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2600   0.4611   0.4842   0.5633   0.8407  
## 
## Coefficients:
##                     Estimate Std. Error z value Pr(>|z|)   
## (Intercept)          0.85831    0.34111   2.516   0.0119 * 
## CVLtca               0.04749    0.01718   2.765   0.0057 **
## PovStatBelow         1.30441    0.66183   1.971   0.0487 * 
## CVLtca:PovStatBelow -0.05105    0.03263  -1.564   0.1178   
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 496.05  on 637  degrees of freedom
## AIC: 504.05
## 
## Number of Fisher Scoring iterations: 4
plot(predictorEffect("CVLtca",CVLTlog4))

California Verbal Learning Test (Total Correct Trial A) - Physical Assault

Model 1

CVLTlog1 <- glm(PhysAssault ~ CVLtca, data=Allvars,family = "binomial")
summary(CVLTlog1)
## 
## Call:
## glm(formula = PhysAssault ~ CVLtca, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.6067  -0.5309  -0.5087  -0.4873   2.1695  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept) -2.25338    0.33030  -6.822 8.97e-12 ***
## CVLtca       0.01521    0.01505   1.011    0.312    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 481.50  on 639  degrees of freedom
## AIC: 485.5
## 
## Number of Fisher Scoring iterations: 4
confint(CVLTlog1)
##                   2.5 %      97.5 %
## (Intercept) -2.92543925 -1.62855334
## CVLtca      -0.01407327  0.04501825
exp(cbind(OR = coef(CVLTlog1), confint(CVLTlog1)))
##                    OR      2.5 %    97.5 %
## (Intercept) 0.1050432 0.05364113 0.1962132
## CVLtca      1.0153312 0.98602529 1.0460469
plot(allEffects(CVLTlog1))

########Compare to null model 
#Difference in Deviance
with(CVLTlog1,null.deviance - deviance)
## [1] 1.030224
#Degrees of freedom for the difference between two models
with(CVLTlog1,df.null - df.residual)
## [1] 1
#p-value
with(CVLTlog1,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.3101061

Model 2

CVLTlog2 <- glm(PhysAssault ~ CVLtca + Age + Sex + PovStat + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog2)
## 
## Call:
## glm(formula = PhysAssault ~ CVLtca + Age + Sex + PovStat + WRATtotal, 
##     family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.8203  -0.5516  -0.4716  -0.3932   2.3909  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  -1.369388   1.063372  -1.288   0.1978  
## CVLtca        0.003692   0.016615   0.222   0.8241  
## Age          -0.032616   0.014098  -2.313   0.0207 *
## SexMen       -0.143840   0.249702  -0.576   0.5646  
## PovStatBelow  0.494611   0.254675   1.942   0.0521 .
## WRATtotal     0.016375   0.017888   0.915   0.3600  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 469.38  on 635  degrees of freedom
## AIC: 481.38
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog2)
##                     2.5 %       97.5 %
## (Intercept)  -3.491971077  0.685248919
## CVLtca       -0.028593810  0.036641979
## Age          -0.060680847 -0.005287059
## SexMen       -0.637616292  0.344169067
## PovStatBelow -0.009561475  0.991649370
## WRATtotal    -0.017785200  0.052499542
exp(cbind(OR = coef(CVLTlog2), confint(CVLTlog2)))
##                     OR      2.5 %    97.5 %
## (Intercept)  0.2542626 0.03044081 1.9842657
## CVLtca       1.0036992 0.97181112 1.0373216
## Age          0.9679098 0.94112355 0.9947269
## SexMen       0.8660259 0.52855083 1.4108171
## PovStatBelow 1.6398605 0.99048409 2.6956770
## WRATtotal    1.0165096 0.98237202 1.0539021
########Compare to null model 
#Difference in Deviance
with(CVLTlog2,null.deviance - deviance)
## [1] 13.15643
#Degrees of freedom for the difference between two models
with(CVLTlog2,df.null - df.residual)
## [1] 5
#p-value
with(CVLTlog2,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.02195614

Model 3

CVLTlog3 <- glm(PhysAssault ~ (CVLtca + Sex + PovStat)^3 + Age + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog3)
## 
## Call:
## glm(formula = PhysAssault ~ (CVLtca + Sex + PovStat)^3 + Age + 
##     WRATtotal, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.8807  -0.5521  -0.4699  -0.3868   2.3692  
## 
## Coefficients:
##                            Estimate Std. Error z value Pr(>|z|)  
## (Intercept)                -1.56944    1.17685  -1.334   0.1823  
## CVLtca                      0.01507    0.02827   0.533   0.5939  
## SexMen                      0.31859    0.90423   0.352   0.7246  
## PovStatBelow                1.19628    0.93802   1.275   0.2022  
## Age                        -0.03285    0.01415  -2.321   0.0203 *
## WRATtotal                   0.01566    0.01802   0.869   0.3847  
## CVLtca:SexMen              -0.02338    0.04019  -0.582   0.5608  
## CVLtca:PovStatBelow        -0.03456    0.04091  -0.845   0.3982  
## SexMen:PovStatBelow        -1.59191    1.38680  -1.148   0.2510  
## CVLtca:SexMen:PovStatBelow  0.08675    0.06569   1.321   0.1867  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 467.48  on 631  degrees of freedom
## AIC: 487.48
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog3)
##                                  2.5 %       97.5 %
## (Intercept)                -3.94186703  0.682851594
## CVLtca                     -0.03911156  0.072130045
## SexMen                     -1.45623021  2.114702092
## PovStatBelow               -0.64898891  3.058400756
## Age                        -0.06103090 -0.005420145
## WRATtotal                  -0.01877807  0.052007524
## CVLtca:SexMen              -0.10277124  0.055227806
## CVLtca:PovStatBelow        -0.11546733  0.045572506
## SexMen:PovStatBelow        -4.37034666  1.095833308
## CVLtca:SexMen:PovStatBelow -0.04073430  0.217556779
exp(cbind(OR = coef(CVLTlog3), confint(CVLTlog3)))
##                                   OR      2.5 %     97.5 %
## (Intercept)                0.2081609 0.01941194  1.9795145
## CVLtca                     1.0151877 0.96164343  1.0747951
## SexMen                     1.3751903 0.23311341  8.2871166
## PovStatBelow               3.3077874 0.52257388 21.2934765
## Age                        0.9676869 0.94079417  0.9945945
## WRATtotal                  1.0157839 0.98139714  1.0533837
## CVLtca:SexMen              0.9768927 0.90233337  1.0567813
## CVLtca:PovStatBelow        0.9660316 0.89094968  1.0466269
## SexMen:PovStatBelow        0.2035359 0.01264686  2.9916746
## CVLtca:SexMen:PovStatBelow 1.0906242 0.96008419  1.2430360
########Compare to null model 
#Difference in Deviance
with(CVLTlog3,null.deviance - deviance)
## [1] 15.04792
#Degrees of freedom for the difference between two models
with(CVLTlog3,df.null - df.residual)
## [1] 9
#p-value
with(CVLTlog3,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.08962819

Compare Models 1,2, & 3

anova(CVLTlog1,CVLTlog2,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLtca
## Model 2: PhysAssault ~ CVLtca + Age + Sex + PovStat + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)  
## 1       639     481.50                       
## 2       635     469.38  4   12.126  0.01644 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(CVLTlog2,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLtca + Age + Sex + PovStat + WRATtotal
## Model 2: PhysAssault ~ (CVLtca + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       635     469.38                     
## 2       631     467.48  4   1.8915   0.7557
anova(CVLTlog1,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLtca
## Model 2: PhysAssault ~ (CVLtca + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)  
## 1       639     481.50                       
## 2       631     467.48  8   14.018  0.08131 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Suggested Model by Predictors

anova(CVLTlog3, test="Chisq")
## Analysis of Deviance Table
## 
## Model: binomial, link: logit
## 
## Response: PhysAssault
## 
## Terms added sequentially (first to last)
## 
## 
##                    Df Deviance Resid. Df Resid. Dev Pr(>Chi)  
## NULL                                 640     482.53           
## CVLtca              1   1.0302       639     481.50  0.31011  
## Sex                 1   0.4987       638     481.00  0.48006  
## PovStat             1   5.3563       637     475.65  0.02065 *
## Age                 1   5.4114       636     470.24  0.02001 *
## WRATtotal           1   0.8598       635     469.38  0.35379  
## CVLtca:Sex          1   0.0796       634     469.30  0.77790  
## CVLtca:PovStat      1   0.0033       633     469.29  0.95451  
## Sex:PovStat         1   0.0390       632     469.25  0.84345  
## CVLtca:Sex:PovStat  1   1.7697       631     467.48  0.18342  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
CVLTlog4 <- glm(PsychAggress ~ PovStat + Age, data = Allvars, family = "binomial")
summary(CVLTlog4)
## 
## Call:
## glm(formula = PsychAggress ~ PovStat + Age, family = "binomial", 
##     data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.2470   0.4626   0.5111   0.5704   0.6795  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)    
## (Intercept)   2.93498    0.64793   4.530  5.9e-06 ***
## PovStatBelow  0.24765    0.26716   0.927   0.3539    
## Age          -0.02408    0.01292  -1.864   0.0623 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.4  on 640  degrees of freedom
## Residual deviance: 500.3  on 638  degrees of freedom
## AIC: 506.3
## 
## Number of Fisher Scoring iterations: 4

California Verbal Learning Test (Long Delayed Free Recall) - Psychological Aggression

Model 1

CVLTlog1 <- glm(PsychAggress ~ CVLfrl, data=Allvars,family = "binomial")
summary(CVLTlog1)
## 
## Call:
## glm(formula = PsychAggress ~ CVLfrl, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.4382   0.4088   0.5132   0.5737   0.7125  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  1.24154    0.20846   5.956 2.59e-09 ***
## CVLfrl       0.11988    0.03651   3.284  0.00102 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 494.01  on 639  degrees of freedom
## AIC: 498.01
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog1)
##                  2.5 %    97.5 %
## (Intercept) 0.84167993 1.6603766
## CVLfrl      0.04955222 0.1929286
exp(cbind(OR = coef(CVLTlog1), confint(CVLTlog1)))
##                   OR    2.5 %   97.5 %
## (Intercept) 3.460942 2.320262 5.261292
## CVLfrl      1.127367 1.050800 1.212796
plot(allEffects(CVLTlog1))

########Compare to null model 
#Difference in Deviance
with(CVLTlog1,null.deviance - deviance)
## [1] 11.39152
#Degrees of freedom for the difference between two models
with(CVLTlog1,df.null - df.residual)
## [1] 1
#p-value
with(CVLTlog1,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.0007377998

Model 2

CVLTlog2 <- glm(PsychAggress ~ CVLfrl + Age + Sex + PovStat + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog2)
## 
## Call:
## glm(formula = PsychAggress ~ CVLfrl + Age + Sex + PovStat + WRATtotal, 
##     family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.4604   0.3885   0.4867   0.5876   0.8772  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)  
## (Intercept)   1.48555    0.95470   1.556   0.1197  
## CVLfrl        0.09764    0.03976   2.456   0.0141 *
## Age          -0.01359    0.01351  -1.006   0.3143  
## SexMen       -0.32575    0.24041  -1.355   0.1754  
## PovStatBelow  0.34545    0.27276   1.266   0.2053  
## WRATtotal     0.01367    0.01512   0.904   0.3662  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 488.38  on 635  degrees of freedom
## AIC: 500.38
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog2)
##                    2.5 %     97.5 %
## (Intercept)  -0.36542427 3.38494073
## CVLfrl        0.02029872 0.17648432
## Age          -0.04025046 0.01282705
## SexMen       -0.80195754 0.14310289
## PovStatBelow -0.17561150 0.89805025
## WRATtotal    -0.01652091 0.04294846
exp(cbind(OR = coef(CVLTlog2), confint(CVLTlog2)))
##                     OR     2.5 %    97.5 %
## (Intercept)  4.4174118 0.6939022 29.516243
## CVLfrl       1.1025658 1.0205061  1.193016
## Age          0.9864970 0.9605488  1.012910
## SexMen       0.7219892 0.4484502  1.153849
## PovStatBelow 1.4126221 0.8389438  2.454812
## WRATtotal    1.0137609 0.9836148  1.043884
plot(predictorEffect("CVLfrl",CVLTlog2))

########Compare to null model 
#Difference in Deviance
with(CVLTlog2,null.deviance - deviance)
## [1] 17.02069
#Degrees of freedom for the difference between two models
with(CVLTlog2,df.null - df.residual)
## [1] 5
#p-value
with(CVLTlog2,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.004460721

Model 3

CVLTlog3 <- glm(PsychAggress ~ (CVLfrl + Sex + PovStat)^3 + Age + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog3)
## 
## Call:
## glm(formula = PsychAggress ~ (CVLfrl + Sex + PovStat)^3 + Age + 
##     WRATtotal, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.4092   0.3891   0.4796   0.5819   0.9066  
## 
## Coefficients:
##                             Estimate Std. Error z value Pr(>|z|)
## (Intercept)                 1.594364   0.995644   1.601    0.109
## CVLfrl                      0.081954   0.064865   1.263    0.206
## SexMen                     -0.539601   0.519371  -1.039    0.299
## PovStatBelow                0.034576   0.728639   0.047    0.962
## Age                        -0.013555   0.013553  -1.000    0.317
## WRATtotal                   0.014485   0.015217   0.952    0.341
## CVLfrl:SexMen               0.020872   0.087237   0.239    0.811
## CVLfrl:PovStatBelow         0.019247   0.118391   0.163    0.871
## SexMen:PovStatBelow         0.403466   0.951778   0.424    0.672
## CVLfrl:SexMen:PovStatBelow  0.007243   0.175255   0.041    0.967
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.4  on 640  degrees of freedom
## Residual deviance: 487.7  on 631  degrees of freedom
## AIC: 507.7
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog3)
##                                  2.5 %     97.5 %
## (Intercept)                -0.33012860 3.58191681
## CVLfrl                     -0.04333937 0.21245834
## SexMen                     -1.58108983 0.46411696
## PovStatBelow               -1.35788726 1.53077967
## Age                        -0.04029900 0.01294495
## WRATtotal                  -0.01586669 0.04396449
## CVLfrl:SexMen              -0.15057415 0.19264865
## CVLfrl:PovStatBelow        -0.21063952 0.25722477
## SexMen:PovStatBelow        -1.48466750 2.27285707
## CVLfrl:SexMen:PovStatBelow -0.33464295 0.35634530
exp(cbind(OR = coef(CVLTlog3), confint(CVLTlog3)))
##                                   OR     2.5 %    97.5 %
## (Intercept)                4.9251943 0.7188313 35.942369
## CVLfrl                     1.0854060 0.9575864  1.236715
## SexMen                     0.5829807 0.2057507  1.590609
## PovStatBelow               1.0351811 0.2572036  4.621779
## Age                        0.9865361 0.9605022  1.013029
## WRATtotal                  1.0145904 0.9842585  1.044945
## CVLfrl:SexMen              1.0210918 0.8602139  1.212457
## CVLfrl:PovStatBelow        1.0194336 0.8100660  1.293336
## SexMen:PovStatBelow        1.4970042 0.2265777  9.707095
## CVLfrl:SexMen:PovStatBelow 1.0072689 0.7155935  1.428101
########Compare to null model 
#Difference in Deviance
with(CVLTlog3,null.deviance - deviance)
## [1] 17.70202
#Degrees of freedom for the difference between two models
with(CVLTlog3,df.null - df.residual)
## [1] 9
#p-value
with(CVLTlog3,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.03879225

Compare Models 1,2, & 3

anova(CVLTlog1,CVLTlog2,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLfrl
## Model 2: PsychAggress ~ CVLfrl + Age + Sex + PovStat + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       639     494.01                     
## 2       635     488.38  4   5.6292   0.2286
anova(CVLTlog2,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLfrl + Age + Sex + PovStat + WRATtotal
## Model 2: PsychAggress ~ (CVLfrl + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       635     488.38                     
## 2       631     487.70  4  0.68133   0.9536
anova(CVLTlog1,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLfrl
## Model 2: PsychAggress ~ (CVLfrl + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       639     494.01                     
## 2       631     487.70  8   6.3105   0.6125

Suggested Model by Predictors

anova(CVLTlog3, test="Chisq")
## Analysis of Deviance Table
## 
## Model: binomial, link: logit
## 
## Response: PsychAggress
## 
## Terms added sequentially (first to last)
## 
## 
##                    Df Deviance Resid. Df Resid. Dev  Pr(>Chi)    
## NULL                                 640     505.40              
## CVLfrl              1  11.3915       639     494.01 0.0007378 ***
## Sex                 1   1.9347       638     492.08 0.1642450    
## PovStat             1   1.9131       637     490.16 0.1666241    
## Age                 1   0.9772       636     489.18 0.3228861    
## WRATtotal           1   0.8042       635     488.38 0.3698439    
## CVLfrl:Sex          1   0.0535       634     488.33 0.8170136    
## CVLfrl:PovStat      1   0.0071       633     488.32 0.9330413    
## Sex:PovStat         1   0.6190       632     487.70 0.4314100    
## CVLfrl:Sex:PovStat  1   0.0017       631     487.70 0.9670288    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
CVLTlog4 <- glm(PsychAggress ~ CVLfrl, data = Allvars, family = "binomial")
summary(CVLTlog4)
## 
## Call:
## glm(formula = PsychAggress ~ CVLfrl, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.4382   0.4088   0.5132   0.5737   0.7125  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  1.24154    0.20846   5.956 2.59e-09 ***
## CVLfrl       0.11988    0.03651   3.284  0.00102 ** 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 494.01  on 639  degrees of freedom
## AIC: 498.01
## 
## Number of Fisher Scoring iterations: 5
plot(allEffects(CVLTlog3))

California Verbal Learning Test (Long Delayed Free Recall) - Physical Assault

Model 1

CVLTlog1 <- glm(PhysAssault ~ CVLfrl, data=Allvars,family = "binomial")
summary(CVLTlog1)
## 
## Call:
## glm(formula = PhysAssault ~ CVLfrl, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.6037  -0.5267  -0.5088  -0.4830   2.1318  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept) -2.16353    0.24189  -8.944   <2e-16 ***
## CVLfrl       0.03691    0.03500   1.055    0.292    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 481.42  on 639  degrees of freedom
## AIC: 485.42
## 
## Number of Fisher Scoring iterations: 4
confint(CVLTlog1)
##                   2.5 %     97.5 %
## (Intercept) -2.65528125 -1.7053017
## CVLfrl      -0.03197077  0.1055069
exp(cbind(OR = coef(CVLTlog1), confint(CVLTlog1)))
##                    OR      2.5 %    97.5 %
## (Intercept) 0.1149186 0.07027907 0.1817175
## CVLfrl      1.0375994 0.96853490 1.1112738
########Compare to null model 
#Difference in Deviance
with(CVLTlog1,null.deviance - deviance)
## [1] 1.108404
#Degrees of freedom for the difference between two models
with(CVLTlog1,df.null - df.residual)
## [1] 1
#p-value
with(CVLTlog1,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.2924291

Model 2

CVLTlog2 <- glm(PhysAssault ~ CVLfrl + Age + Sex + PovStat + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog2)
## 
## Call:
## glm(formula = PhysAssault ~ CVLfrl + Age + Sex + PovStat + WRATtotal, 
##     family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.8222  -0.5505  -0.4723  -0.3947   2.3860  
## 
## Coefficients:
##               Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  -1.326022   1.048693  -1.264   0.2061  
## CVLfrl        0.003212   0.038750   0.083   0.9339  
## Age          -0.033009   0.014255  -2.316   0.0206 *
## SexMen       -0.151689   0.248636  -0.610   0.5418  
## PovStatBelow  0.489547   0.253616   1.930   0.0536 .
## WRATtotal     0.017181   0.017742   0.968   0.3329  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 469.42  on 635  degrees of freedom
## AIC: 481.42
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog2)
##                    2.5 %       97.5 %
## (Intercept)  -3.41939734  0.700297485
## CVLfrl       -0.07270854  0.079504533
## Age          -0.06136406 -0.005354469
## SexMen       -0.64344728  0.334149873
## PovStatBelow -0.01264032  0.984415506
## WRATtotal    -0.01669413  0.053017533
exp(cbind(OR = coef(CVLTlog2), confint(CVLTlog2)))
##                     OR      2.5 %    97.5 %
## (Intercept)  0.2655314 0.03273216 2.0143519
## CVLfrl       1.0032176 0.92987181 1.0827505
## Age          0.9675298 0.94048079 0.9946598
## SexMen       0.8592554 0.52547783 1.3967525
## PovStatBelow 1.6315765 0.98743923 2.6762472
## WRATtotal    1.0173294 0.98344444 1.0544481
########Compare to null model 
#Difference in Deviance
with(CVLTlog2,null.deviance - deviance)
## [1] 13.1138
#Degrees of freedom for the difference between two models
with(CVLTlog2,df.null - df.residual)
## [1] 5
#p-value
with(CVLTlog2,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.02233536

Model 3

CVLTlog3 <- glm(PhysAssault ~ (CVLfrl + Sex + PovStat)^3 + Age + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog3)
## 
## Call:
## glm(formula = PhysAssault ~ (CVLfrl + Sex + PovStat)^3 + Age + 
##     WRATtotal, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.9608  -0.5456  -0.4611  -0.3756   2.3880  
## 
## Coefficients:
##                            Estimate Std. Error z value Pr(>|z|)  
## (Intercept)                -1.54116    1.11091  -1.387   0.1654  
## CVLfrl                      0.05847    0.06311   0.926   0.3542  
## SexMen                      0.16453    0.66352   0.248   0.8042  
## PovStatBelow                1.74987    0.69446   2.520   0.0117 *
## Age                        -0.03334    0.01429  -2.333   0.0196 *
## WRATtotal                   0.01402    0.01794   0.782   0.4345  
## CVLfrl:SexMen              -0.04768    0.09093  -0.524   0.6000  
## CVLfrl:PovStatBelow        -0.21185    0.10025  -2.113   0.0346 *
## SexMen:PovStatBelow        -1.68383    1.02211  -1.647   0.0995 .
## CVLfrl:SexMen:PovStatBelow  0.30140    0.15435   1.953   0.0509 .
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 463.48  on 631  degrees of freedom
## AIC: 483.48
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog3)
##                                   2.5 %       97.5 %
## (Intercept)                -3.768138754  0.596098027
## CVLfrl                     -0.063914094  0.184956139
## SexMen                     -1.134460897  1.487606633
## PovStatBelow                0.394379812  3.136825838
## Age                        -0.061778689 -0.005627172
## WRATtotal                  -0.020308030  0.050188403
## CVLfrl:SexMen              -0.228410112  0.129351707
## CVLfrl:PovStatBelow        -0.412916523 -0.018096870
## SexMen:PovStatBelow        -3.734693589  0.293286423
## CVLfrl:SexMen:PovStatBelow  0.001638781  0.608694441
exp(cbind(OR = coef(CVLTlog2), confint(CVLTlog3)))
## Warning in cbind(OR = coef(CVLTlog2), confint(CVLTlog3)): number of rows of
## result is not a multiple of vector length (arg 1)
##                                   OR      2.5 %     97.5 %
## (Intercept)                0.2655314 0.02309501  1.8150228
## CVLfrl                     1.0032176 0.93808558  1.2031657
## SexMen                     0.9675298 0.32159545  4.4264886
## PovStatBelow               0.8592554 1.48346388 23.0306477
## Age                        1.6315765 0.94009092  0.9943886
## WRATtotal                  1.0173294 0.97989679  1.0514692
## CVLfrl:SexMen              0.2655314 0.79579783  1.1380903
## CVLfrl:PovStatBelow        1.0032176 0.66171752  0.9820659
## SexMen:PovStatBelow        0.9675298 0.02388049  1.3408268
## CVLfrl:SexMen:PovStatBelow 0.8592554 1.00164012  1.8380302
########Compare to null model 
#Difference in Deviance
with(CVLTlog3,null.deviance - deviance)
## [1] 19.05303
#Degrees of freedom for the difference between two models
with(CVLTlog3,df.null - df.residual)
## [1] 9
#p-value
with(CVLTlog3,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.02474572
interact_plot(model = CVLTlog3, pred = CVLfrl, modx = PovStat)

sim_slopes(CVLTlog3, pred = CVLfrl, modx = PovStat, centered = "all",jnplot = TRUE)
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of CVLfrl when PovStat = Below: 
## 
##    Est.   S.E.   z val.      p
## ------- ------ -------- ------
##   -0.03   0.06    -0.48   0.63
## 
## Slope of CVLfrl when PovStat = Above: 
## 
##   Est.   S.E.   z val.      p
## ------ ------ -------- ------
##   0.04   0.05     0.74   0.46

Compare Models 1,2, & 3

anova(CVLTlog1,CVLTlog2,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLfrl
## Model 2: PhysAssault ~ CVLfrl + Age + Sex + PovStat + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)  
## 1       639     481.42                       
## 2       635     469.42  4   12.005  0.01731 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(CVLTlog2,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLfrl + Age + Sex + PovStat + WRATtotal
## Model 2: PhysAssault ~ (CVLfrl + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       635     469.42                     
## 2       631     463.48  4   5.9392   0.2037
anova(CVLTlog1,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLfrl
## Model 2: PhysAssault ~ (CVLfrl + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)  
## 1       639     481.42                       
## 2       631     463.48  8   17.945  0.02165 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Suggested Model by Predictors

anova(CVLTlog3, test="Chisq")
## Analysis of Deviance Table
## 
## Model: binomial, link: logit
## 
## Response: PhysAssault
## 
## Terms added sequentially (first to last)
## 
## 
##                    Df Deviance Resid. Df Resid. Dev Pr(>Chi)  
## NULL                                 640     482.53           
## CVLfrl              1   1.1084       639     481.42  0.29243  
## Sex                 1   0.4968       638     480.93  0.48093  
## PovStat             1   5.1657       637     475.76  0.02304 *
## Age                 1   5.3792       636     470.38  0.02038 *
## WRATtotal           1   0.9638       635     469.42  0.32624  
## CVLfrl:Sex          1   0.7056       634     468.71  0.40092  
## CVLfrl:PovStat      1   1.3469       633     467.37  0.24582  
## Sex:PovStat         1   0.0029       632     467.36  0.95673  
## CVLfrl:Sex:PovStat  1   3.8838       631     463.48  0.04875 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
CVLTlog4 <- glm(PhysAssault ~ (CVLfrl + Sex + PovStat)^3 + Age, data = Allvars, family = "binomial")
summary(CVLTlog4)
## 
## Call:
## glm(formula = PhysAssault ~ (CVLfrl + Sex + PovStat)^3 + Age, 
##     family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.9864  -0.5483  -0.4612  -0.3796   2.3782  
## 
## Coefficients:
##                            Estimate Std. Error z value Pr(>|z|)  
## (Intercept)                -0.99969    0.86316  -1.158   0.2468  
## CVLfrl                      0.06886    0.06197   1.111   0.2665  
## SexMen                      0.19959    0.66423   0.300   0.7638  
## PovStatBelow                1.76865    0.69517   2.544   0.0110 *
## Age                        -0.03318    0.01431  -2.319   0.0204 *
## CVLfrl:SexMen              -0.04885    0.09132  -0.535   0.5927  
## CVLfrl:PovStatBelow        -0.21716    0.10022  -2.167   0.0302 *
## SexMen:PovStatBelow        -1.76553    1.02113  -1.729   0.0838 .
## CVLfrl:SexMen:PovStatBelow  0.31076    0.15463   2.010   0.0445 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 464.10  on 632  degrees of freedom
## AIC: 482.1
## 
## Number of Fisher Scoring iterations: 5
sim_slopes(CVLTlog4, pred = CVLfrl, modx = Sex,mod2 = PovStat,centered = "all",jnplot = TRUE)
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## █████████████████████ While PovStat (2nd moderator) = Above ████████████████████ 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of CVLfrl when Sex = Women: 
## 
##   Est.   S.E.   z val.      p
## ------ ------ -------- ------
##   0.07   0.06     1.11   0.27
## 
## Slope of CVLfrl when Sex = Men: 
## 
##   Est.   S.E.   z val.      p
## ------ ------ -------- ------
##   0.02   0.07     0.29   0.77
## 
## █████████████████████ While PovStat (2nd moderator) = Below ████████████████████ 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of CVLfrl when Sex = Women: 
## 
##    Est.   S.E.   z val.      p
## ------- ------ -------- ------
##   -0.15   0.08    -1.85   0.06
## 
## Slope of CVLfrl when Sex = Men: 
## 
##   Est.   S.E.   z val.      p
## ------ ------ -------- ------
##   0.11   0.10     1.17   0.24
## 
## NULL

California Verbal Learning Test (Short Delayed Free Recall) - Psychological Aggression

Model 1

CVLTlog1 <- glm(PsychAggress ~ CVLfrs, data=Allvars,family = "binomial")
summary(CVLTlog1)
## 
## Call:
## glm(formula = PsychAggress ~ CVLfrs, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.3304   0.4406   0.5232   0.5693   0.6717  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  1.37418    0.21530   6.383 1.74e-10 ***
## CVLfrs       0.09092    0.03595   2.529   0.0114 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 498.81  on 639  degrees of freedom
## AIC: 502.81
## 
## Number of Fisher Scoring iterations: 4
confint(CVLTlog1)
##                  2.5 %    97.5 %
## (Intercept) 0.96232301 1.8079210
## CVLfrs      0.02130092 0.1624842
exp(cbind(OR = coef(CVLTlog1), confint(CVLTlog1)))
##                   OR    2.5 %   97.5 %
## (Intercept) 3.951827 2.617771 6.097757
## CVLfrs      1.095180 1.021529 1.176430
plot(allEffects(CVLTlog1))

########Compare to null model 
#Difference in Deviance
with(CVLTlog1,null.deviance - deviance)
## [1] 6.590249
#Degrees of freedom for the difference between two models
with(CVLTlog1,df.null - df.residual)
## [1] 1
#p-value
with(CVLTlog1,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.01025388

Model 2

CVLTlog2 <- glm(PsychAggress ~ CVLfrs + Age + Sex + PovStat + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog2)
## 
## Call:
## glm(formula = PsychAggress ~ CVLfrs + Age + Sex + PovStat + WRATtotal, 
##     family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.4022   0.4033   0.4940   0.5796   0.8528  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)  
## (Intercept)   1.68965    0.95005   1.778   0.0753 .
## CVLfrs        0.06416    0.03919   1.637   0.1016  
## Age          -0.01655    0.01349  -1.227   0.2198  
## SexMen       -0.37563    0.23872  -1.574   0.1156  
## PovStatBelow  0.32174    0.27222   1.182   0.2372  
## WRATtotal     0.01668    0.01517   1.100   0.2715  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 491.82  on 635  degrees of freedom
## AIC: 503.82
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog2)
##                    2.5 %      97.5 %
## (Intercept)  -0.15074295 3.581577715
## CVLfrs       -0.01239184 0.141526010
## Age          -0.04317355 0.009825015
## SexMen       -0.84877074 0.089687004
## PovStatBelow -0.19825756 0.873317859
## WRATtotal    -0.01356017 0.046079222
exp(cbind(OR = coef(CVLTlog2), confint(CVLTlog2)))
##                     OR     2.5 %    97.5 %
## (Intercept)  5.4175632 0.8600688 35.930184
## CVLfrs       1.0662659 0.9876846  1.152030
## Age          0.9835833 0.9577452  1.009873
## SexMen       0.6868532 0.4279407  1.093832
## PovStatBelow 1.3795323 0.8201586  2.394843
## WRATtotal    1.0168195 0.9865314  1.047157
########Compare to null model 
#Difference in Deviance
with(CVLTlog2,null.deviance - deviance)
## [1] 13.57884
#Degrees of freedom for the difference between two models
with(CVLTlog2,df.null - df.residual)
## [1] 5
#p-value
with(CVLTlog2,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.01851807

Model 3

CVLTlog3 <- glm(PsychAggress ~ (CVLfrs + Sex + PovStat)^3 + Age + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog3)
## 
## Call:
## glm(formula = PsychAggress ~ (CVLfrs + Sex + PovStat)^3 + Age + 
##     WRATtotal, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.4191   0.4137   0.4819   0.5750   0.8827  
## 
## Coefficients:
##                             Estimate Std. Error z value Pr(>|z|)  
## (Intercept)                 1.746423   0.985751   1.772   0.0764 .
## CVLfrs                      0.061861   0.064502   0.959   0.3375  
## SexMen                     -0.521850   0.526470  -0.991   0.3216  
## PovStatBelow                0.451159   0.777362   0.580   0.5617  
## Age                        -0.016645   0.013563  -1.227   0.2197  
## WRATtotal                   0.017110   0.015252   1.122   0.2619  
## CVLfrs:SexMen               0.009237   0.085199   0.108   0.9137  
## CVLfrs:PovStatBelow        -0.058364   0.117321  -0.497   0.6189  
## SexMen:PovStatBelow        -0.178900   1.012604  -0.177   0.8598  
## CVLfrs:SexMen:PovStatBelow  0.114186   0.174686   0.654   0.5133  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 490.65  on 631  degrees of freedom
## AIC: 510.65
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog3)
##                                  2.5 %      97.5 %
## (Intercept)                -0.15644107 3.717405147
## CVLfrs                     -0.06328045 0.191168570
## SexMen                     -1.57745880 0.496345881
## PovStatBelow               -1.01346251 2.072883547
## Age                        -0.04341788 0.009867831
## WRATtotal                  -0.01327224 0.046698314
## CVLfrs:SexMen              -0.15853628 0.176616872
## CVLfrs:PovStatBelow        -0.29008092 0.173430402
## SexMen:PovStatBelow        -2.20399826 1.799787040
## CVLfrs:SexMen:PovStatBelow -0.22596721 0.462209001
exp(cbind(OR = coef(CVLTlog3), confint(CVLTlog3)))
##                                   OR     2.5 %    97.5 %
## (Intercept)                5.7340536 0.8551819 41.157458
## CVLfrs                     1.0638144 0.9386802  1.210664
## SexMen                     0.5934216 0.2064992  1.642708
## PovStatBelow               1.5701307 0.3629600  7.947708
## Age                        0.9834927 0.9575112  1.009917
## WRATtotal                  1.0172574 0.9868154  1.047806
## CVLfrs:SexMen              1.0092796 0.8533920  1.193174
## CVLfrs:PovStatBelow        0.9433069 0.7482030  1.189378
## SexMen:PovStatBelow        0.8361892 0.1103610  6.048359
## CVLfrs:SexMen:PovStatBelow 1.1209605 0.7977443  1.587577
########Compare to null model 
#Difference in Deviance
with(CVLTlog3,null.deviance - deviance)
## [1] 14.75029
#Degrees of freedom for the difference between two models
with(CVLTlog3,df.null - df.residual)
## [1] 9
#p-value
with(CVLTlog3,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.09802732

Compare Models 1,2, & 3

anova(CVLTlog1,CVLTlog2,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLfrs
## Model 2: PsychAggress ~ CVLfrs + Age + Sex + PovStat + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       639     498.81                     
## 2       635     491.82  4   6.9886   0.1365
anova(CVLTlog2,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLfrs + Age + Sex + PovStat + WRATtotal
## Model 2: PsychAggress ~ (CVLfrs + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       635     491.82                     
## 2       631     490.65  4   1.1715   0.8828
anova(CVLTlog1,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PsychAggress ~ CVLfrs
## Model 2: PsychAggress ~ (CVLfrs + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       639     498.81                     
## 2       631     490.65  8     8.16    0.418

Suggested Model by Predictors

anova(CVLTlog3, test="Chisq")
## Analysis of Deviance Table
## 
## Model: binomial, link: logit
## 
## Response: PsychAggress
## 
## Terms added sequentially (first to last)
## 
## 
##                    Df Deviance Resid. Df Resid. Dev Pr(>Chi)  
## NULL                                 640     505.40           
## CVLfrs              1   6.5902       639     498.81  0.01025 *
## Sex                 1   2.6495       638     496.16  0.10358  
## PovStat             1   1.7011       637     494.46  0.19214  
## Age                 1   1.4498       636     493.01  0.22856  
## WRATtotal           1   1.1882       635     491.82  0.27569  
## CVLfrs:Sex          1   0.2197       634     491.60  0.63924  
## CVLfrs:PovStat      1   0.0451       633     491.56  0.83176  
## Sex:PovStat         1   0.4765       632     491.08  0.49000  
## CVLfrs:Sex:PovStat  1   0.4301       631     490.65  0.51196  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
CVLTlog4 <- glm(PsychAggress ~ CVLfrs, data = Allvars, family = "binomial")
summary(CVLTlog4)
## 
## Call:
## glm(formula = PsychAggress ~ CVLfrs, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -2.3304   0.4406   0.5232   0.5693   0.6717  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept)  1.37418    0.21530   6.383 1.74e-10 ***
## CVLfrs       0.09092    0.03595   2.529   0.0114 *  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 505.40  on 640  degrees of freedom
## Residual deviance: 498.81  on 639  degrees of freedom
## AIC: 502.81
## 
## Number of Fisher Scoring iterations: 4
plot(allEffects(CVLTlog4))

California Verbal Learning Test (Short Delayed Free Recall) - Physical Assault

Model 1

CVLTlog1 <- glm(PhysAssault ~ CVLfrs, data=Allvars,family = "binomial")
summary(CVLTlog1)
## 
## Call:
## glm(formula = PhysAssault ~ CVLfrs, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.5613  -0.5279  -0.5118  -0.4962   2.0950  
## 
## Coefficients:
##             Estimate Std. Error z value Pr(>|z|)    
## (Intercept) -2.07647    0.24361  -8.524   <2e-16 ***
## CVLfrs       0.02201    0.03571   0.616    0.538    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 482.15  on 639  degrees of freedom
## AIC: 486.15
## 
## Number of Fisher Scoring iterations: 4
confint(CVLTlog1)
##                   2.5 %      97.5 %
## (Intercept) -2.57185249 -1.61505512
## CVLfrs      -0.04822674  0.09204515
exp(cbind(OR = coef(CVLTlog1), confint(CVLTlog1)))
##                    OR     2.5 %    97.5 %
## (Intercept) 0.1253721 0.0763939 0.1988797
## CVLfrs      1.0222498 0.9529177 1.0964143
plot(predictorEffect("CVLfrs",CVLTlog1))

########Compare to null model 
#Difference in Deviance
with(CVLTlog1,null.deviance - deviance)
## [1] 0.3792601
#Degrees of freedom for the difference between two models
with(CVLTlog1,df.null - df.residual)
## [1] 1
#p-value
with(CVLTlog1,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.5379995

Model 2

CVLTlog2 <- glm(PhysAssault ~ CVLfrs + Age + Sex + PovStat + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog2)
## 
## Call:
## glm(formula = PhysAssault ~ CVLfrs + Age + Sex + PovStat + WRATtotal, 
##     family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -0.8204  -0.5499  -0.4749  -0.3933   2.3918  
## 
## Coefficients:
##              Estimate Std. Error z value Pr(>|z|)  
## (Intercept)  -1.24393    1.04408  -1.191   0.2335  
## CVLfrs       -0.01332    0.03923  -0.339   0.7342  
## Age          -0.03454    0.01421  -2.431   0.0150 *
## SexMen       -0.16754    0.24647  -0.680   0.4967  
## PovStatBelow  0.48208    0.25340   1.902   0.0571 .
## WRATtotal     0.01933    0.01779   1.086   0.2773  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 469.31  on 635  degrees of freedom
## AIC: 481.31
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog2)
##                    2.5 %       97.5 %
## (Intercept)  -3.32802792  0.773449568
## CVLfrs       -0.09020012  0.063887421
## Age          -0.06282922 -0.007012407
## SexMen       -0.65525937  0.313848030
## PovStatBelow -0.01980692  0.976408787
## WRATtotal    -0.01464108  0.055273015
exp(cbind(OR = coef(CVLTlog2), confint(CVLTlog2)))
##                     OR      2.5 %    97.5 %
## (Intercept)  0.2882480 0.03586376 2.1672294
## CVLfrs       0.9867715 0.91374831 1.0659724
## Age          0.9660500 0.93910384 0.9930121
## SexMen       0.8457455 0.51930735 1.3686817
## PovStatBelow 1.6194445 0.98038795 2.6549048
## WRATtotal    1.0195179 0.98546558 1.0568291
########Compare to null model 
#Difference in Deviance
with(CVLTlog2,null.deviance - deviance)
## [1] 13.22208
#Degrees of freedom for the difference between two models
with(CVLTlog2,df.null - df.residual)
## [1] 5
#p-value
with(CVLTlog2,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.02138416

Model 3

CVLTlog3 <- glm(PhysAssault ~ (CVLfrs + Sex + PovStat)^3 + Age + WRATtotal, data = Allvars, family = "binomial")
summary(CVLTlog3)
## 
## Call:
## glm(formula = PhysAssault ~ (CVLfrs + Sex + PovStat)^3 + Age + 
##     WRATtotal, family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.0298  -0.5418  -0.4576  -0.3739   2.5096  
## 
## Coefficients:
##                            Estimate Std. Error z value Pr(>|z|)   
## (Intercept)                -1.75276    1.12368  -1.560  0.11880   
## CVLfrs                      0.07310    0.06396   1.143  0.25305   
## SexMen                      0.42285    0.67236   0.629  0.52942   
## PovStatBelow                2.04485    0.69990   2.922  0.00348 **
## Age                        -0.03437    0.01427  -2.408  0.01602 * 
## WRATtotal                   0.01754    0.01814   0.967  0.33363   
## CVLfrs:SexMen              -0.09053    0.09203  -0.984  0.32529   
## CVLfrs:PovStatBelow        -0.26603    0.10348  -2.571  0.01014 * 
## SexMen:PovStatBelow        -1.90367    1.03608  -1.837  0.06615 . 
## CVLfrs:SexMen:PovStatBelow  0.33770    0.15904   2.123  0.03372 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 461.85  on 631  degrees of freedom
## AIC: 481.85
## 
## Number of Fisher Scoring iterations: 5
confint(CVLTlog3)
##                                  2.5 %      97.5 %
## (Intercept)                -4.00877842  0.40460004
## CVLfrs                     -0.05036067  0.20195206
## SexMen                     -0.89138897  1.76734247
## PovStatBelow                0.68639107  3.45020200
## Age                        -0.06278525 -0.00671841
## WRATtotal                  -0.01713924  0.05412889
## CVLfrs:SexMen              -0.27352409  0.08858167
## CVLfrs:PovStatBelow        -0.47447559 -0.06691616
## SexMen:PovStatBelow        -3.98657186  0.09702919
## CVLfrs:SexMen:PovStatBelow  0.02909837  0.65460576
exp(cbind(OR = coef(CVLTlog3), confint(CVLTlog3)))
##                                   OR      2.5 %     97.5 %
## (Intercept)                0.1732950 0.01815556  1.4987030
## CVLfrs                     1.0758389 0.95088640  1.2237893
## SexMen                     1.5262979 0.41008576  5.8552721
## PovStatBelow               7.7279951 1.98653331 31.5067561
## Age                        0.9662183 0.93914513  0.9933041
## WRATtotal                  1.0176916 0.98300680  1.0556207
## CVLfrs:SexMen              0.9134514 0.76069401  1.0926235
## CVLfrs:PovStatBelow        0.7664193 0.62221126  0.9352736
## SexMen:PovStatBelow        0.1490209 0.01856324  1.1018925
## CVLfrs:SexMen:PovStatBelow 1.4017152 1.02952586  1.9243837
########Compare to null model 
#Difference in Deviance
with(CVLTlog3,null.deviance - deviance)
## [1] 20.67999
#Degrees of freedom for the difference between two models
with(CVLTlog3,df.null - df.residual)
## [1] 9
#p-value
with(CVLTlog3,pchisq(null.deviance-deviance,df.null-df.residual,lower.tail=FALSE))
## [1] 0.01414967
interact_plot(model = CVLTlog3, pred = CVLfrs, modx = Sex,mod2 = PovStat)

sim_slopes(CVLTlog3, pred = CVLfrs, modx = Sex, mod2 = PovStat, centered = "all",jnplot = TRUE)
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## █████████████████████ While PovStat (2nd moderator) = Above ████████████████████ 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of CVLfrs when Sex = Women: 
## 
##   Est.   S.E.   z val.      p
## ------ ------ -------- ------
##   0.07   0.06     1.14   0.25
## 
## Slope of CVLfrs when Sex = Men: 
## 
##    Est.   S.E.   z val.      p
## ------- ------ -------- ------
##   -0.02   0.07    -0.25   0.80
## 
## █████████████████████ While PovStat (2nd moderator) = Below ████████████████████ 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of CVLfrs when Sex = Women: 
## 
##    Est.   S.E.   z val.      p
## ------- ------ -------- ------
##   -0.19   0.08    -2.30   0.02
## 
## Slope of CVLfrs when Sex = Men: 
## 
##   Est.   S.E.   z val.      p
## ------ ------ -------- ------
##   0.05   0.10     0.53   0.59
## 
## NULL

Compare Models 1,2, & 3

anova(CVLTlog1,CVLTlog2,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLfrs
## Model 2: PhysAssault ~ CVLfrs + Age + Sex + PovStat + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)  
## 1       639     482.15                       
## 2       635     469.31  4   12.843  0.01207 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
anova(CVLTlog2,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLfrs + Age + Sex + PovStat + WRATtotal
## Model 2: PhysAssault ~ (CVLfrs + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)
## 1       635     469.31                     
## 2       631     461.85  4   7.4579   0.1136
anova(CVLTlog1,CVLTlog3,test = "LR")
## Analysis of Deviance Table
## 
## Model 1: PhysAssault ~ CVLfrs
## Model 2: PhysAssault ~ (CVLfrs + Sex + PovStat)^3 + Age + WRATtotal
##   Resid. Df Resid. Dev Df Deviance Pr(>Chi)   
## 1       639     482.15                        
## 2       631     461.85  8   20.301 0.009256 **
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

Suggested Model by Predictors

anova(CVLTlog3, test="Chisq")
## Analysis of Deviance Table
## 
## Model: binomial, link: logit
## 
## Response: PhysAssault
## 
## Terms added sequentially (first to last)
## 
## 
##                    Df Deviance Resid. Df Resid. Dev Pr(>Chi)  
## NULL                                 640     482.53           
## CVLfrs              1   0.3793       639     482.15  0.53800  
## Sex                 1   0.6493       638     481.50  0.42035  
## PovStat             1   5.0214       637     476.48  0.02504 *
## Age                 1   5.9552       636     470.53  0.01467 *
## WRATtotal           1   1.2169       635     469.31  0.26998  
## CVLfrs:Sex          1   0.1598       634     469.15  0.68934  
## CVLfrs:PovStat      1   2.6917       633     466.46  0.10087  
## Sex:PovStat         1   0.0008       632     466.46  0.97769  
## CVLfrs:Sex:PovStat  1   4.6056       631     461.85  0.03187 *
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
CVLTlog4 <- glm(PhysAssault ~ (CVLfrs + Sex + PovStat)^3 + Age, data = Allvars, family = "binomial")
summary(CVLTlog4)
## 
## Call:
## glm(formula = PhysAssault ~ (CVLfrs + Sex + PovStat)^3 + Age, 
##     family = "binomial", data = Allvars)
## 
## Deviance Residuals: 
##     Min       1Q   Median       3Q      Max  
## -1.0423  -0.5394  -0.4560  -0.3780   2.4097  
## 
## Coefficients:
##                            Estimate Std. Error z value Pr(>|z|)   
## (Intercept)                -1.06510    0.86278  -1.235  0.21701   
## CVLfrs                      0.08561    0.06278   1.364  0.17266   
## SexMen                      0.46806    0.67280   0.696  0.48663   
## PovStatBelow                2.04632    0.69952   2.925  0.00344 **
## Age                        -0.03426    0.01429  -2.398  0.01647 * 
## CVLfrs:SexMen              -0.09293    0.09244  -1.005  0.31475   
## CVLfrs:PovStatBelow        -0.26936    0.10345  -2.604  0.00922 **
## SexMen:PovStatBelow        -1.99570    1.03499  -1.928  0.05383 . 
## CVLfrs:SexMen:PovStatBelow  0.34794    0.15931   2.184  0.02896 * 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## (Dispersion parameter for binomial family taken to be 1)
## 
##     Null deviance: 482.53  on 640  degrees of freedom
## Residual deviance: 462.81  on 632  degrees of freedom
## AIC: 480.81
## 
## Number of Fisher Scoring iterations: 5
sim_slopes(CVLTlog4, pred = CVLfrs, modx = Sex, mod2 = PovStat, centered = "all",jnplot = TRUE)
## Warning: Johnson-Neyman intervals are not available for factor moderators.
## █████████████████████ While PovStat (2nd moderator) = Above ████████████████████ 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of CVLfrs when Sex = Women: 
## 
##   Est.   S.E.   z val.      p
## ------ ------ -------- ------
##   0.09   0.06     1.36   0.17
## 
## Slope of CVLfrs when Sex = Men: 
## 
##    Est.   S.E.   z val.      p
## ------- ------ -------- ------
##   -0.01   0.07    -0.11   0.92
## 
## █████████████████████ While PovStat (2nd moderator) = Below ████████████████████ 
## 
## SIMPLE SLOPES ANALYSIS 
## 
## Slope of CVLfrs when Sex = Women: 
## 
##    Est.   S.E.   z val.      p
## ------- ------ -------- ------
##   -0.18   0.08    -2.20   0.03
## 
## Slope of CVLfrs when Sex = Men: 
## 
##   Est.   S.E.   z val.      p
## ------ ------ -------- ------
##   0.07   0.10     0.71   0.48
## 
## NULL
interact_plot(model = CVLTlog4, pred = CVLfrs, modx = Sex,mod2 = PovStat)