Installing and Checking Packages
library("lavaan")
library("effects")
library("psych")
library("lme4")
library("lmerTest")
library("sjstats")
library("sjmisc")
library("lattice")
Importing and Attaching Data
library("sjmisc")
setwd("C:/Users/pickrese/Dropbox/Vanderbilt/Cutting Lab/Reading Error Measure (RED)/PCRC/Poster Data/Wide Data Y2")
REDmasterPassage <- read.csv("C:/Users/pickrese/Dropbox/Vanderbilt/Cutting Lab/Reading Error Measure (RED)/PCRC/Poster Data/Wide Data Y2/REDmasterPassage.csv")
View(REDmasterPassage)
attach(REDmasterPassage)
Checking Variable Distributions
histogram(rc3_pass_expository_total)
boxplot(rc3_pass_expository_total)
histogram(rc3_pass_narrative_total)
boxplot(rc3_pass_narrative_total)
Passage Specific Comprehension
PC1 <- lm(rc3_pass_expository_total ~ CWPM_E + DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(PC1)
##
## Call:
## lm(formula = rc3_pass_expository_total ~ CWPM_E + DeltaDSyM_E_Sum,
## data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -93.73 -43.38 14.04 45.52 66.48
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) -7.70140 14.14893 -0.544 0.587
## CWPM_E 0.62254 0.12484 4.987 1.64e-06 ***
## DeltaDSyM_E_Sum 0.06031 0.35301 0.171 0.865
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 47.59 on 154 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.1819, Adjusted R-squared: 0.1713
## F-statistic: 17.12 on 2 and 154 DF, p-value: 1.935e-07
PC2 <- lm(rc3_pass_expository_total ~ CWPM_E + rc3_wj_br_ss_age + DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(PC2)
##
## Call:
## lm(formula = rc3_pass_expository_total ~ CWPM_E + rc3_wj_br_ss_age +
## DeltaDSyM_E_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -89.89 -45.38 13.83 44.21 65.67
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 42.6301 50.5538 0.843 0.400
## CWPM_E 0.7949 0.1751 4.540 1.14e-05 ***
## rc3_wj_br_ss_age -0.5959 0.5406 -1.102 0.272
## DeltaDSyM_E_Sum -0.0860 0.3864 -0.223 0.824
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 47.18 on 151 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.2031, Adjusted R-squared: 0.1873
## F-statistic: 12.83 on 3 and 151 DF, p-value: 1.639e-07
PC3 <- lm(rc3_pass_narrative_total ~ CWPM_N + DeltaDSyM_N_Sum , data = REDmasterPassage)
summary(PC3)
##
## Call:
## lm(formula = rc3_pass_narrative_total ~ CWPM_N + DeltaDSyM_N_Sum,
## data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.8928 -0.4669 0.2397 0.6433 1.1634
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.493979 0.252678 25.701 < 2e-16 ***
## CWPM_N 0.006869 0.001831 3.752 0.000248 ***
## DeltaDSyM_N_Sum 0.002814 0.006305 0.446 0.655968
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8525 on 154 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.1012, Adjusted R-squared: 0.08955
## F-statistic: 8.672 on 2 and 154 DF, p-value: 0.0002699
PC4 <- lm(rc3_pass_narrative_total ~ CWPM_N + rc3_wj_br_ss_age + DeltaDSyM_N_Sum , data = REDmasterPassage)
summary(PC4)
##
## Call:
## lm(formula = rc3_pass_narrative_total ~ CWPM_N + rc3_wj_br_ss_age +
## DeltaDSyM_N_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -2.9001 -0.4748 0.1880 0.6525 1.4340
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.6876222 0.8438859 9.110 4.68e-16 ***
## CWPM_N 0.0092338 0.0024769 3.728 0.000272 ***
## rc3_wj_br_ss_age -0.0132586 0.0089581 -1.480 0.140936
## DeltaDSyM_N_Sum -0.0007235 0.0067792 -0.107 0.915145
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8545 on 151 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.1104, Adjusted R-squared: 0.09271
## F-statistic: 6.245 on 3 and 151 DF, p-value: 0.0005026
PC5 <- lm(rc3_pass_expository_total ~ DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(PC5)
##
## Call:
## lm(formula = rc3_pass_expository_total ~ DeltaDSyM_E_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -53.93 -47.45 -19.84 47.34 98.95
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 58.5523 4.9658 11.791 < 2e-16 ***
## DeltaDSyM_E_Sum -0.8945 0.3171 -2.821 0.00541 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 51.12 on 156 degrees of freedom
## (5 observations deleted due to missingness)
## Multiple R-squared: 0.04854, Adjusted R-squared: 0.04244
## F-statistic: 7.958 on 1 and 156 DF, p-value: 0.005409
PC6 <- lm(rc3_pass_expository_total ~ DeltaDSyM_E_Average , data = REDmasterPassage)
summary(PC6)
##
## Call:
## lm(formula = rc3_pass_expository_total ~ DeltaDSyM_E_Average,
## data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -49.50 -45.42 -29.51 49.02 105.59
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 50.3233 8.8585 5.681 6.39e-08 ***
## DeltaDSyM_E_Average 0.2547 10.5155 0.024 0.981
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 52.4 on 156 degrees of freedom
## (5 observations deleted due to missingness)
## Multiple R-squared: 3.761e-06, Adjusted R-squared: -0.006406
## F-statistic: 0.0005867 on 1 and 156 DF, p-value: 0.9807
PC7 <- lm(rc3_pass_narrative_total ~ DeltaDSyM_N_Sum , data = REDmasterPassage)
summary(PC7)
##
## Call:
## lm(formula = rc3_pass_narrative_total ~ DeltaDSyM_N_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2164 -0.3617 0.6223 0.6746 1.3871
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 7.386304 0.088954 83.035 <2e-16 ***
## DeltaDSyM_N_Sum -0.009674 0.005577 -1.735 0.0848 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8877 on 155 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.01904, Adjusted R-squared: 0.01272
## F-statistic: 3.009 on 1 and 155 DF, p-value: 0.08478
PC8 <- lm(rc3_pass_narrative_total ~ DeltaDSyM_N_Average , data = REDmasterPassage)
summary(PC8)
##
## Call:
## lm(formula = rc3_pass_narrative_total ~ DeltaDSyM_N_Average,
## data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -3.2649 -0.3604 0.2906 0.6946 1.0279
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 6.8796 0.1865 36.896 <2e-16 ***
## DeltaDSyM_N_Average 0.4472 0.1868 2.394 0.0179 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 0.8802 on 155 degrees of freedom
## (6 observations deleted due to missingness)
## Multiple R-squared: 0.03565, Adjusted R-squared: 0.02943
## F-statistic: 5.73 on 1 and 155 DF, p-value: 0.01788
Generalized Comprehension
C1 <- lm(rc3_wj_pc_raw_age ~ CWPM_E + DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(C1)
##
## Call:
## lm(formula = rc3_wj_pc_raw_age ~ CWPM_E + DeltaDSyM_E_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -9.0124 -2.1294 0.0826 2.2997 6.4252
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.205372 0.901236 25.748 <2e-16 ***
## CWPM_E 0.080398 0.008004 10.044 <2e-16 ***
## DeltaDSyM_E_Sum -0.039062 0.022295 -1.752 0.0818 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.999 on 153 degrees of freedom
## (7 observations deleted due to missingness)
## Multiple R-squared: 0.5357, Adjusted R-squared: 0.5296
## F-statistic: 88.26 on 2 and 153 DF, p-value: < 2.2e-16
C2 <- lm(rc3_wj_pc_raw_age ~ CWPM_N + DeltaDSyM_N_Sum , data = REDmasterPassage)
summary(C2)
##
## Call:
## lm(formula = rc3_wj_pc_raw_age ~ CWPM_N + DeltaDSyM_N_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.6707 -1.8317 0.1626 2.0845 6.8713
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 23.545775 0.900595 26.145 <2e-16 ***
## CWPM_N 0.063632 0.006551 9.713 <2e-16 ***
## DeltaDSyM_N_Sum -0.052280 0.022398 -2.334 0.0209 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.027 on 153 degrees of freedom
## (7 observations deleted due to missingness)
## Multiple R-squared: 0.5281, Adjusted R-squared: 0.522
## F-statistic: 85.62 on 2 and 153 DF, p-value: < 2.2e-16
C3 <- lm(rc3_gates_comp_raw ~ CWPM_N + DeltaDSyM_N_Sum , data = REDmasterPassage)
summary(C3)
##
## Call:
## lm(formula = rc3_gates_comp_raw ~ CWPM_N + DeltaDSyM_N_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -14.3127 -4.4153 -0.2315 4.6118 15.3100
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.38239 1.81968 8.453 2.23e-14 ***
## CWPM_N 0.16349 0.01318 12.403 < 2e-16 ***
## DeltaDSyM_N_Sum -0.11448 0.04543 -2.520 0.0128 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6.118 on 151 degrees of freedom
## (9 observations deleted due to missingness)
## Multiple R-squared: 0.6358, Adjusted R-squared: 0.631
## F-statistic: 131.8 on 2 and 151 DF, p-value: < 2.2e-16
C4 <- lm(rc3_gates_comp_raw ~ CWPM_E + DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(C4)
##
## Call:
## lm(formula = rc3_gates_comp_raw ~ CWPM_E + DeltaDSyM_E_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -11.5462 -3.7698 -0.3809 3.7813 15.3752
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 15.70929 1.77722 8.839 2.32e-15 ***
## CWPM_E 0.19744 0.01567 12.603 < 2e-16 ***
## DeltaDSyM_E_Sum -0.13174 0.04448 -2.962 0.00356 **
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.948 on 151 degrees of freedom
## (9 observations deleted due to missingness)
## Multiple R-squared: 0.6592, Adjusted R-squared: 0.6546
## F-statistic: 146 on 2 and 151 DF, p-value: < 2.2e-16
C5 <- lm(rc3_gates_comp_raw ~ CWPM_E + rc3_wj_br_ss_age + DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(C5)
##
## Call:
## lm(formula = rc3_gates_comp_raw ~ CWPM_E + rc3_wj_br_ss_age +
## DeltaDSyM_E_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -10.9735 -3.6518 -0.5113 4.0024 15.0810
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 8.79754 6.33501 1.389 0.1670
## CWPM_E 0.17964 0.02193 8.190 1.12e-13 ***
## rc3_wj_br_ss_age 0.07878 0.06768 1.164 0.2463
## DeltaDSyM_E_Sum -0.11188 0.04873 -2.296 0.0231 *
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 5.898 on 148 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.6627, Adjusted R-squared: 0.6558
## F-statistic: 96.91 on 3 and 148 DF, p-value: < 2.2e-16
C6 <- lm(rc3_gates_comp_raw ~ CWPM_N + rc3_wj_br_ss_age + DeltaDSyM_N_Sum , data = REDmasterPassage)
summary(C6)
##
## Call:
## lm(formula = rc3_gates_comp_raw ~ CWPM_N + rc3_wj_br_ss_age +
## DeltaDSyM_N_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -13.6556 -4.1177 0.0004 4.2054 14.8802
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 2.69828 5.96846 0.452 0.6519
## CWPM_N 0.13492 0.01749 7.714 1.65e-12 ***
## rc3_wj_br_ss_age 0.14533 0.06329 2.296 0.0231 *
## DeltaDSyM_N_Sum -0.08159 0.04798 -1.700 0.0912 .
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 6.027 on 148 degrees of freedom
## (11 observations deleted due to missingness)
## Multiple R-squared: 0.6443, Adjusted R-squared: 0.6371
## F-statistic: 89.35 on 3 and 148 DF, p-value: < 2.2e-16
C7 <- lm(rc3_wj_pc_raw_age ~ CWPM_E + rc3_wj_br_ss_age + DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(C7)
##
## Call:
## lm(formula = rc3_wj_pc_raw_age ~ CWPM_E + rc3_wj_br_ss_age +
## DeltaDSyM_E_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -8.4073 -2.0684 -0.0961 2.3918 6.3903
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 17.16302 3.18951 5.381 2.77e-07 ***
## CWPM_E 0.06468 0.01105 5.855 2.87e-08 ***
## rc3_wj_br_ss_age 0.06811 0.03411 1.997 0.0476 *
## DeltaDSyM_E_Sum -0.02001 0.02438 -0.821 0.4131
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 2.977 on 151 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.5457, Adjusted R-squared: 0.5367
## F-statistic: 60.47 on 3 and 151 DF, p-value: < 2.2e-16
C8 <- lm(rc3_wj_pc_raw_age ~ CWPM_N + rc3_wj_br_ss_age + DeltaDSyM_N_Sum , data = REDmasterPassage)
summary(C8)
##
## Call:
## lm(formula = rc3_wj_pc_raw_age ~ CWPM_N + rc3_wj_br_ss_age +
## DeltaDSyM_N_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -7.9486 -1.8484 0.1081 2.2402 6.6016
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 17.601992 2.963416 5.940 1.89e-08 ***
## CWPM_N 0.051112 0.008698 5.876 2.59e-08 ***
## rc3_wj_br_ss_age 0.066849 0.031457 2.125 0.0352 *
## DeltaDSyM_N_Sum -0.035345 0.023806 -1.485 0.1397
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 3.001 on 151 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.5397, Adjusted R-squared: 0.5305
## F-statistic: 59.01 on 3 and 151 DF, p-value: < 2.2e-16
*should I center all the variables?
M8 <- lm(rc3_wj_br_ss_age ~ CWPM_E + DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(M8)
##
## Call:
## lm(formula = rc3_wj_br_ss_age ~ CWPM_E + DeltaDSyM_E_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.9930 -5.2943 -0.2757 5.3421 16.7321
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 89.69727 2.14538 41.809 < 2e-16 ***
## CWPM_E 0.22354 0.01901 11.760 < 2e-16 ***
## DeltaDSyM_E_Sum -0.29502 0.05280 -5.587 1.04e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.08 on 152 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.6965, Adjusted R-squared: 0.6926
## F-statistic: 174.5 on 2 and 152 DF, p-value: < 2.2e-16
M9 <- lm(rc3_wj_br_ss_age ~ CWPM_E + DeltaDSyM_E_Sum , data = REDmasterPassage)
summary(M9)
##
## Call:
## lm(formula = rc3_wj_br_ss_age ~ CWPM_E + DeltaDSyM_E_Sum, data = REDmasterPassage)
##
## Residuals:
## Min 1Q Median 3Q Max
## -20.9930 -5.2943 -0.2757 5.3421 16.7321
##
## Coefficients:
## Estimate Std. Error t value Pr(>|t|)
## (Intercept) 89.69727 2.14538 41.809 < 2e-16 ***
## CWPM_E 0.22354 0.01901 11.760 < 2e-16 ***
## DeltaDSyM_E_Sum -0.29502 0.05280 -5.587 1.04e-07 ***
## ---
## Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
##
## Residual standard error: 7.08 on 152 degrees of freedom
## (8 observations deleted due to missingness)
## Multiple R-squared: 0.6965, Adjusted R-squared: 0.6926
## F-statistic: 174.5 on 2 and 152 DF, p-value: < 2.2e-16