| Threshold | Model | Parameter | Estimate | SE | p.value | AIC | LogLik | nObs | nExams | nSubs |
|---|---|---|---|---|---|---|---|---|---|---|
| None | PA | Outcome | 0.417669 | 0.171179 | 0.218 | 13294.44 | -6625.222 | 1704 | 253 | 88 |
| None | PA | PE | 3.286408 | 0.437849 | 0.004** | — | — | — | — | — |
| None | NA | Outcome | -0.648700 | 0.202300 | 0.1133 | 13561.31 | -6758.657 | 1704 | 253 | 88 |
| None | NA | PE | -2.780200 | 0.463400 | <0.001*** | — | — | — | — | — |
| 2 | PA | Outcome | 0.411520 | 0.178972 | 0.2366 | 13261.46 | -6608.729 | 1700 | 249 | 88 |
| 2 | PA | PE | 3.263114 | 0.441290 | 0.00481** | — | — | — | — | — |
| 2 | NA | Outcome | -0.626000 | 0.202800 | 0.117 | 13527.14 | -6741.568 | 1700 | 249 | 88 |
| 2 | NA | PE | -2.767500 | 0.465200 | <0.001*** | — | — | — | — | — |
| 5 | PA | Outcome | 0.438400 | 0.257700 | 0.342 | 11581.12 | -5768.561 | 1487 | 178 | 81 |
| 5 | PA | PE | 3.470100 | 0.505300 | <0.001*** | — | — | — | — | — |
| 5 | NA | Outcome | -0.532400 | 0.286100 | 0.2966 | 11853.39 | -5904.695 | 1487 | 178 | 81 |
| 5 | NA | PE | -2.198700 | 0.626400 | 0.1048 | — | — | — | — | — |
| Dataset | Affect | predictor | Estimate | SE | p-value |
|---|---|---|---|---|---|
| Exploratory | Positive | outcome | 0.2292979 | 0.1817715 | 0.2119148 |
| Exploratory | Positive | PE | 3.3819096 | 0.5106526 | 0.0000002 |
| Exploratory | Negative | outcome | -0.5979154 | 0.3407177 | 0.1880818 |
| Exploratory | Negative | PE | -2.7743699 | 0.7936415 | 0.0664478 |
| Confirmatory | Positive | outcome | 0.4219167 | 0.1330221 | 0.0022481 |
| Confirmatory | Positive | PE | 3.2227409 | 0.4071812 | 0.0000000 |
| Confirmatory | Negative | outcome | -0.6415713 | 0.1911985 | 0.0013328 |
| Confirmatory | Negative | PE | -2.6914964 | 0.4589421 | 0.0000000 |
| Dataset | Affect | Parameter | Estimate | SE | X2 | P | Lower | Upper |
|---|---|---|---|---|---|---|---|---|
| Exploratory | Positive | Outcome | 0.2292979 | 0.1817715 | 1.591287 | 0.2071423 | -0.1269677 | 0.5855635 |
| Exploratory | Positive | PE | 3.3819096 | 0.5106526 | 43.860427 | 0.0000000 | 2.3810489 | 4.3827704 |
| Exploratory | Positive | PE - Outcome | 3.1526117 | 0.5372360 | 34.435843 | 0.0000000 | 2.0996484 | 4.2055749 |
| Exploratory | Negative | Outcome | -0.5979154 | 0.3407177 | 3.079570 | 0.0792815 | -1.2657097 | 0.0698790 |
| Exploratory | Negative | PE | -2.7743699 | 0.7936415 | 12.220248 | 0.0004727 | -4.3298786 | -1.2188612 |
| Exploratory | Negative | PE - Outcome | -2.1764545 | 1.0180621 | 4.570363 | 0.0325297 | -4.1718195 | -0.1810896 |
| Confirmatory | Positive | Outcome | 0.4219167 | 0.1330221 | 10.060187 | 0.0015151 | 0.1611982 | 0.6826351 |
| Confirmatory | Positive | PE | 3.2227409 | 0.4071812 | 62.643403 | 0.0000000 | 2.4246804 | 4.0208013 |
| Confirmatory | Positive | PE - Outcome | 2.8008242 | 0.4217458 | 44.103212 | 0.0000000 | 1.9742177 | 3.6274307 |
| Confirmatory | Negative | Outcome | -0.6415713 | 0.1911985 | 11.259545 | 0.0007921 | -1.0163135 | -0.2668291 |
| Confirmatory | Negative | PE | -2.6914964 | 0.4589421 | 34.393144 | 0.0000000 | -3.5910063 | -1.7919865 |
| Confirmatory | Negative | PE - Outcome | -2.0499251 | 0.5472047 | 14.033836 | 0.0001796 | -3.1224266 | -0.9774237 |
| Dataset | Affect | Model | Df | AIC | BIC | logLik | deviance | Chisq | Chi Df | Pr(>Chisq) |
|---|---|---|---|---|---|---|---|---|---|---|
| Exploratory | Positive | Outcome | 12 | 8442.114 | 8502.053 | -4209.057 | 8418.114 | NA | NA | NA |
| Exploratory | Positive | Outcome + PE | 22 | 8371.188 | 8481.075 | -4163.594 | 8327.188 | 90.92624 | 10 | 0 |
| Exploratory | Negative | Outcome | 12 | 8898.657 | 8958.595 | -4437.328 | 8874.657 | NA | NA | NA |
| Exploratory | Negative | Outcome + PE | 22 | 8823.956 | 8933.843 | -4389.978 | 8779.956 | 94.70077 | 10 | 0 |
| Confirmatory | Positive | Outcome | 12 | 13420.859 | 13486.147 | -6698.429 | 13396.859 | NA | NA | NA |
| Confirmatory | Positive | Outcome + PE | 22 | 13294.052 | 13413.748 | -6625.026 | 13250.052 | 146.80631 | 10 | 0 |
| Confirmatory | Negative | Outcome | 12 | 13686.540 | 13751.828 | -6831.270 | 13662.540 | NA | NA | NA |
| Confirmatory | Negative | Outcome + PE | 22 | 13564.975 | 13684.671 | -6760.487 | 13520.975 | 141.56491 | 10 | 0 |
| * NOTE: P-v | alues are n | ot equal to zer | o, bu | t are very c | lose (i.e., | 1e-25) |
May need to reconsider how we set up this contrast
Note: NA estimates are corrected for direction before model is run (NA observations are multiplied by -1 below)
for (i in 1:nrow(long_df)){
if (long_df$Aff_valence[i] == 2) {
long_df$Affect[i] <- -1*(long_df$Affect[i])
}
}
long_df.crossed <- lmer(Affect ~ Aff_valence:(outcome + PE) + (1 | cohort / id / exam_num), data = long_df, REML = TRUE)
long_df.crossed.summ <- as.data.frame(coef(summary(long_df.crossed)))
long_df.int.esticon <- esticon(long_df.crossed, L = c(0,-1,1,1,-1), conf.in = NULL)
long_df.int.esticon.summ <- as.data.frame(long_df.int.esticon)
long_df.int.esticon.summ[,c(1,5)] <- NULL
colnames(long_df.int.esticon.summ) <- c("Estimate", "SE", "X2", "P", "Lower", "Upper")
long_df.int.esticon.summ$Contrast <- "PA(PE - Outcome) - NA(PE - Outcome)"
long_df.int.esticon.summ <- long_df.int.esticon.summ[,c("Contrast", "Estimate", "SE", "X2", "P", "Lower", "Upper")]
kable(long_df.crossed.summ)
| Estimate | Std. Error | df | t value | Pr(>|t|) | |
|---|---|---|---|---|---|
| (Intercept) | -1.8602018 | 0.8754619 | 148.5741 | -2.124823 | 0.0352561 |
| Aff_valence1:outcome | 0.6119893 | 0.0912270 | 3307.0985 | 6.708422 | 0.0000000 |
| Aff_valence2:outcome | 0.3586038 | 0.0912270 | 3307.0985 | 3.930894 | 0.0000864 |
| Aff_valence1:PE | 2.4912516 | 0.2486492 | 2768.9999 | 10.019140 | 0.0000000 |
| Aff_valence2:PE | 3.1845086 | 0.2486492 | 2768.9999 | 12.807232 | 0.0000000 |
kable(long_df.int.esticon.summ)
| Contrast | Estimate | SE | X2 | P | Lower | Upper |
|---|---|---|---|---|---|---|
| PA(PE - Outcome) - NA(PE - Outcome) | -0.9466426 | 0.2192122 | 18.64845 | 0.0000157 | -1.376291 | -0.5169946 |