Final model

Processing other data

Overall model

For some reason, we get a different overall model when we use the population-level (not ID, i.e. not student but overall) predictions. There’s also some code for using the equation.

Some other representations of models

Here’s one using the student-level predictions.

In these models, the intercepts and slopes are adjusted based on the random effects for those terms.

Look out, lots going on.

We can color these by something like final grade.

We can also do this by something like cost value, which was recoded from the data I had (a file with all three semesters), so higher levels represent not higher cost but lower cost. But, that’s a bit confusing, because the top lines seem to be associated with lower levels of cost-value, i.e., they had to give up a lot for the course. I guess that could be because they’re putting in time.

Or by grade quartiles. It looks like those in quartile 3 (not 4, which is the highest) may have a higher intercept.

Models

E-V predicting curves

Here are some models, first for antecedents of different intercepts and slopes.

## 
## Call:
## lm(formula = intercept ~ task_value * perceived_competence, data = dfm_b)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -11.783  -6.266  -2.551   4.763  42.061 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)
## (Intercept)                       1.5473    25.0690   0.062    0.951
## task_value                        2.9146     6.2361   0.467    0.641
## perceived_competence              1.4122     6.2882   0.225    0.822
## task_value:perceived_competence  -0.4395     1.5087  -0.291    0.771
## 
## Residual standard error: 8.844 on 248 degrees of freedom
##   (20 observations deleted due to missingness)
## Multiple R-squared:  0.004028,   Adjusted R-squared:  -0.00802 
## F-statistic: 0.3343 on 3 and 248 DF,  p-value: 0.8005
## 
## Call:
## lm(formula = linear_slope ~ task_value * perceived_competence, 
##     data = dfm_b)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -10.383  -1.171   0.717   1.650   3.123 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)
## (Intercept)                      0.27791    6.47899   0.043    0.966
## task_value                      -0.61472    1.61170  -0.381    0.703
## perceived_competence            -0.28079    1.62517  -0.173    0.863
## task_value:perceived_competence  0.08605    0.38991   0.221    0.826
## 
## Residual standard error: 2.286 on 248 degrees of freedom
##   (20 observations deleted due to missingness)
## Multiple R-squared:  0.003428,   Adjusted R-squared:  -0.008627 
## F-statistic: 0.2844 on 3 and 248 DF,  p-value: 0.8367
## 
## Call:
## lm(formula = quadratic_slope ~ task_value * perceived_competence, 
##     data = dfm_b)
## 
## Residuals:
##      Min       1Q   Median       3Q      Max 
## -0.19012 -0.10156 -0.04411  0.07029  0.61819 
## 
## Coefficients:
##                                  Estimate Std. Error t value Pr(>|t|)
## (Intercept)                     -0.020291   0.392970  -0.052    0.959
## task_value                       0.034424   0.097754   0.352    0.725
## perceived_competence             0.015377   0.098571   0.156    0.876
## task_value:perceived_competence -0.004658   0.023649  -0.197    0.844
## 
## Residual standard error: 0.1386 on 248 degrees of freedom
##   (20 observations deleted due to missingness)
## Multiple R-squared:  0.003247,   Adjusted R-squared:  -0.008811 
## F-statistic: 0.2693 on 3 and 248 DF,  p-value: 0.8475

Just tried a different type of value - utility value in this case.

E-V predicting final grades

Here are models with the antecedents predicting final grade

m3 <- lm(final_grade ~ task_value * perceived_competence, data = dfm_b)
summary(m3)
## 
## Call:
## lm(formula = final_grade ~ task_value * perceived_competence, 
##     data = dfm_b)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -41.019  -7.050   1.993   7.841  20.421 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                       11.364     29.427   0.386   0.6997  
## task_value                        14.918      7.320   2.038   0.0426 *
## perceived_competence              14.440      7.381   1.956   0.0515 .
## task_value:perceived_competence   -2.836      1.771  -1.601   0.1106  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.38 on 248 degrees of freedom
##   (20 observations deleted due to missingness)
## Multiple R-squared:  0.09329,    Adjusted R-squared:  0.08232 
## F-statistic: 8.506 on 3 and 248 DF,  p-value: 2.125e-05
m4 <- lm(final_grade ~ task_value * perceived_competence, data = dfm_b)
summary(m4)
## 
## Call:
## lm(formula = final_grade ~ task_value * perceived_competence, 
##     data = dfm_b)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -41.019  -7.050   1.993   7.841  20.421 
## 
## Coefficients:
##                                 Estimate Std. Error t value Pr(>|t|)  
## (Intercept)                       11.364     29.427   0.386   0.6997  
## task_value                        14.918      7.320   2.038   0.0426 *
## perceived_competence              14.440      7.381   1.956   0.0515 .
## task_value:perceived_competence   -2.836      1.771  -1.601   0.1106  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.38 on 248 degrees of freedom
##   (20 observations deleted due to missingness)
## Multiple R-squared:  0.09329,    Adjusted R-squared:  0.08232 
## F-statistic: 8.506 on 3 and 248 DF,  p-value: 2.125e-05

Also looked at outcomes. Adjusted the linear term to be associated with changes per day, though I’m still having a hard time interpreting these coefficients. That said, it doesn’t look like the intercept is (linearly) associated with lower final grades, which is somewhat surprising, but maybe not entirely because quartile 3 demonstrated higher final grades.

## 
## Call:
## lm(formula = final_grade ~ intercept + linear_slope + quadratic_slope, 
##     data = dfm_b)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -33.468  -5.976   0.676   7.074  20.948 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)       42.837     11.305   3.789 0.000189 ***
## intercept         15.022      5.738   2.618 0.009375 ** 
## linear_slope     182.163     91.424   1.993 0.047395 *  
## quadratic_slope 2057.691   1146.074   1.795 0.073784 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 9.542 on 252 degrees of freedom
##   (16 observations deleted due to missingness)
## Multiple R-squared:  0.2278, Adjusted R-squared:  0.2186 
## F-statistic: 24.78 on 3 and 252 DF,  p-value: 4.38e-14
## 
## Call:
## lm(formula = final_grade ~ intercept, data = dfm_b)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -39.661  -6.764   1.392   7.962  20.833 
## 
## Coefficients:
##             Estimate Std. Error t value Pr(>|t|)    
## (Intercept) 82.37970    1.11860  73.645   <2e-16 ***
## intercept    0.13692    0.07643   1.791   0.0744 .  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.75 on 254 degrees of freedom
##   (16 observations deleted due to missingness)
## Multiple R-squared:  0.01248,    Adjusted R-squared:  0.008589 
## F-statistic: 3.209 on 1 and 254 DF,  p-value: 0.07442
## 
## Call:
## lm(formula = final_grade ~ linear_slope, data = dfm_b)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -40.391  -6.922   1.715   8.025  20.552 
## 
## Coefficients:
##              Estimate Std. Error t value Pr(>|t|)    
## (Intercept)   83.4669     0.8812  94.720   <2e-16 ***
## linear_slope  -0.2702     0.2972  -0.909    0.364    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.8 on 254 degrees of freedom
##   (16 observations deleted due to missingness)
## Multiple R-squared:  0.003244,   Adjusted R-squared:  -0.0006807 
## F-statistic: 0.8266 on 1 and 254 DF,  p-value: 0.3641
## 
## Call:
## lm(formula = final_grade ~ quadratic_slope, data = dfm_b)
## 
## Residuals:
##     Min      1Q  Median      3Q     Max 
## -40.584  -6.974   1.888   8.013  20.430 
## 
## Coefficients:
##                 Estimate Std. Error t value Pr(>|t|)    
## (Intercept)      83.6606     0.8445  99.071   <2e-16 ***
## quadratic_slope   3.1096     4.9038   0.634    0.527    
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
## 
## Residual standard error: 10.81 on 254 degrees of freedom
##   (16 observations deleted due to missingness)
## Multiple R-squared:  0.001581,   Adjusted R-squared:  -0.00235 
## F-statistic: 0.4021 on 1 and 254 DF,  p-value: 0.5266