This R Markdown file reads TrimmedMay27.csv, reproduces
the simple Excel-style regressions, and tests the slope parameter one
regression at a time.
For each outcome and each predictor, the fitted model is
\[ y_i = \beta_0 + \beta_1 x_i + \varepsilon_i, \]
and the two-sided slope test is
\[ H_0: \beta_1 = 0 \quad\text{versus}\quad H_A: \beta_1 \ne 0. \]
This version does not use the old multi-panel
command
par(mfrow = c(length(outcomes), length(predictors))) for
the main figures. Instead, it generates, displays, and saves every
regression plot as a separate PNG file. This keeps the titles, axis
labels, equations, and test summaries readable.
## CSV used: TrimmedMay27.csv
## Rows read: 140
## Columns used in the regression analysis: 15
The table below is produced by the requested workflow:
results <- make_results_table(dat, outcomes, predictors, alpha = params$alpha)
emit_table(results)
The output includes one regression equation for each outcome-predictor pair.
| Target variable | Variable names and statistics of slope |
|---|---|
| Cumulative Score (max 36) | log like/view: Predicted Cumulative Score (max 36) = 17.5569 - 3.2141 * log like/view |
| slope = -3.2141; SE = ; t(131) = -2.0207; p = 0.0454 *; n = 133; R^2 = 0.0302; direction: Negative(Significant) | |
| Technical correctness | log like/view: Predicted Technical correctness = 2.4037 - 0.1688 * log like/view |
| slope = -0.1688; SE = ; t(131) = -1.4598; p = 0.1468 ; n = 133; R^2 = 0.0160; direction: Negative(Not Significant) | |
| Technical completeness | log like/view: Predicted Technical completeness = 2.3576 - 0.0247 * log like/view |
| slope = -0.0247; SE = ; t(131) = -0.1488; p = 0.8819 ; n = 133; R^2 = 0.0002; direction: Negative(Not Significant) | |
| Relevance to learners | log like/view: Predicted Relevance to learners = 0.8418 - 0.4446 * log like/view |
| slope = -0.4446; SE = ; t(131) = -1.5315; p = 0.1281 ; n = 133; R^2 = 0.0176; direction: Negative(Not Significant) | |
| Linking to prior knowledge | log like/view: Predicted Linking to prior knowledge = 1.3211 - 0.2498 * log like/view |
| slope = -0.2498; SE = ; t(131) = -1.2064; p = 0.2298 ; n = 133; R^2 = 0.0110; direction: Negative(Not Significant) | |
| Active engagement | log like/view: Predicted Active engagement = 0.3504 + 0.0795 * log like/view |
| slope = 0.0795; SE = ; t(131) = 0.4017; p = 0.6886 ; n = 133; R^2 = 0.0012; direction: Positive(Not Significant) | |
| Direct addressing | log like/view: Predicted Direct addressing = 0.6561 - 0.5893 * log like/view |
| slope = -0.5893; SE = ; t(131) = -2.2581; p = 0.0256 *; n = 133; R^2 = 0.0375; direction: Negative(Significant) | |
| Use of examples | log like/view: Predicted Use of examples = 1.5660 - 0.2178 * log like/view |
| slope = -0.2178; SE = ; t(131) = -0.9566; p = 0.3405 ; n = 133; R^2 = 0.0069; direction: Negative(Not Significant) | |
| Design of visualizations | log like/view: Predicted Design of visualizations = 1.5079 - 0.2085 * log like/view |
| slope = -0.2085; SE = ; t(131) = -1.0048; p = 0.3168 ; n = 133; R^2 = 0.0076; direction: Negative(Not Significant) | |
| Matching visualizations-text | log like/view: Predicted Matching visualizations-text = 1.6491 - 0.3904 * log like/view |
| slope = -0.3904; SE = ; t(131) = -2.0397; p = 0.0434 *; n = 133; R^2 = 0.0308; direction: Negative(Significant) | |
| Language is comprehensive | log like/view: Predicted Language is comprehensive = 1.7527 - 0.5278 * log like/view |
| slope = -0.5278; SE = ; t(131) = -3.3028; p = 0.0012 **; n = 133; R^2 = 0.0769; direction: Negative(Significant) | |
| Language is precise | log like/view: Predicted Language is precise = 1.8163 - 0.3651 * log like/view |
| slope = -0.3651; SE = ; t(131) = -1.6139; p = 0.1090 ; n = 133; R^2 = 0.0195; direction: Negative(Not Significant) | |
| Coherent overall structure | log like/view: Predicted Coherent overall structure = 2.5375 + 0.1857 * log like/view |
| slope = 0.1857; SE = ; t(131) = 1.0339; p = 0.3031 ; n = 133; R^2 = 0.0081; direction: Positive(Not Significant) | |
| Cumulative Score (max 36) | log com/viw: Predicted Cumulative Score (max 36) = 18.0584 - 1.7258 * log com/view |
| slope = -1.7258; SE = ; t(123) = -2.0611; p = 0.0414 *; n = 125; R^2 = 0.0334; direction: Negative(Significant) | |
| Technical correctness | log com/viw: Predicted Technical correctness = 2.5553 - 0.0486 * log com/view |
| slope = -0.0486; SE = ; t(123) = -0.7172; p = 0.4746 ; n = 125; R^2 = 0.0042; direction: Negative(Not Significant) | |
| Technical completeness | log com/viw: Predicted Technical completeness = 1.8791 - 0.1607 * log com/view |
| slope = -0.1607; SE = ; t(123) = -1.7188; p = 0.0882 .; n = 125; R^2 = 0.0235; direction: Negative(Not Significant) | |
| Relevance to learners | log com/viw: Predicted Relevance to learners = 1.3709 - 0.0974 * log com/view |
| slope = -0.0974; SE = ; t(123) = -0.5856; p = 0.5592 ; n = 125; R^2 = 0.0028; direction: Negative(Not Significant) | |
| Linking to prior knowledge | log com/viw: Predicted Linking to prior knowledge = 1.1415 - 0.2076 * log com/view |
| slope = -0.2076; SE = ; t(123) = -1.7709; p = 0.0791 .; n = 125; R^2 = 0.0249; direction: Negative(Not Significant) | |
| Active engagement | log com/viw: Predicted Active engagement = -0.0076 - 0.0659 * log com/view |
| slope = -0.0659; SE = ; t(123) = -0.5347; p = 0.5939 ; n = 125; R^2 = 0.0023; direction: Negative(Not Significant) | |
| Direct addressing | log com/viw: Predicted Direct addressing = 1.9190 + 0.0414 * log com/view |
| slope = 0.0414; SE = ; t(123) = 0.2622; p = 0.7936 ; n = 125; R^2 = 0.0006; direction: Positive(Not Significant) | |
| Use of examples | log com/viw: Predicted Use of examples = 1.6728 - 0.0926 * log com/view |
| slope = -0.0926; SE = ; t(123) = -0.6986; p = 0.4861 ; n = 125; R^2 = 0.0040; direction: Negative(Not Significant) | |
| Design of visualizations | log com/viw: Predicted Design of visualizations = 1.5171 - 0.1243 * log com/view |
| slope = -0.1243; SE = ; t(123) = -1.0293; p = 0.3054 ; n = 125; R^2 = 0.0085; direction: Negative(Not Significant) | |
| Matching visualizations-text | log com/viw: Predicted Matching visualizations-text = 1.7584 - 0.1986 * log com/view |
| slope = -0.1986; SE = ; t(123) = -1.9176; p = 0.0575 .; n = 125; R^2 = 0.0290; direction: Negative(Not Significant) | |
| Language is comprehensive | log com/viw: Predicted Language is comprehensive = 1.6861 - 0.3206 * log com/view |
| slope = -0.3206; SE = ; t(123) = -4.0357; p = <0.001 ***; n = 125; R^2 = 0.1169; direction: Negative(Significant) | |
| Language is precise | log com/viw: Predicted Language is precise = 1.5674 - 0.2825 * log com/view |
| slope = -0.2825; SE = ; t(123) = -2.3253; p = 0.0217 *; n = 125; R^2 = 0.0421; direction: Negative(Significant) | |
| Coherent overall structure | log com/viw: Predicted Coherent overall structure = 1.9384 - 0.0834 * log com/view |
| slope = -0.0834; SE = ; t(123) = -0.8750; p = 0.3833 ; n = 125; R^2 = 0.0062; direction: Negative(Not Significant) |
Each subsection below gives one regression equation, one slope test,
and one downloadable PNG plot. The PNG files are written to the folder
specified by params$plot_dir.
Regression equation: Predicted Cumulative Score (max 36) =
17.5569 - 3.2141 * log like/view
Slope test: slope = -3.2141, t(131) = -2.021, p = 0.0454; the
slope is statistically significant at alpha = 0.050.
Regression equation: Predicted Technical correctness = 2.4037
- 0.1688 * log like/view
Slope test: slope = -0.1688, t(131) = -1.460, p = 0.1468; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Technical completeness =
2.3576 - 0.0247 * log like/view
Slope test: slope = -0.0247, t(131) = -0.149, p = 0.8819; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Relevance to learners = 0.8418
- 0.4446 * log like/view
Slope test: slope = -0.4446, t(131) = -1.532, p = 0.1281; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Linking to prior knowledge =
1.3211 - 0.2498 * log like/view
Slope test: slope = -0.2498, t(131) = -1.206, p = 0.2298; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Active engagement = 0.3504 +
0.0795 * log like/view
Slope test: slope = 0.0795, t(131) = 0.402, p = 0.6886; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Direct addressing = 0.6561 -
0.5893 * log like/view
Slope test: slope = -0.5893, t(131) = -2.258, p = 0.0256; the
slope is statistically significant at alpha = 0.050.
Regression equation: Predicted Use of examples = 1.5660 -
0.2178 * log like/view
Slope test: slope = -0.2178, t(131) = -0.957, p = 0.3405; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Design of visualizations =
1.5079 - 0.2085 * log like/view
Slope test: slope = -0.2085, t(131) = -1.005, p = 0.3168; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Matching visualizations-text =
1.6491 - 0.3904 * log like/view
Slope test: slope = -0.3904, t(131) = -2.040, p = 0.0434; the
slope is statistically significant at alpha = 0.050.
Regression equation: Predicted Language is comprehensive =
1.7527 - 0.5278 * log like/view
Slope test: slope = -0.5278, t(131) = -3.303, p = 0.0012; the
slope is statistically significant at alpha = 0.050.
Regression equation: Predicted Language is precise = 1.8163 -
0.3651 * log like/view
Slope test: slope = -0.3651, t(131) = -1.614, p = 0.1090; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Coherent overall structure =
2.5375 + 0.1857 * log like/view
Slope test: slope = 0.1857, t(131) = 1.034, p = 0.3031; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Cumulative Score (max 36) =
18.0584 - 1.7258 * log com/view
Slope test: slope = -1.7258, t(123) = -2.061, p = 0.0414; the
slope is statistically significant at alpha = 0.050.
Regression equation: Predicted Technical correctness = 2.5553
- 0.0486 * log com/view
Slope test: slope = -0.0486, t(123) = -0.717, p = 0.4746; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Technical completeness =
1.8791 - 0.1607 * log com/view
Slope test: slope = -0.1607, t(123) = -1.719, p = 0.0882; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Relevance to learners = 1.3709
- 0.0974 * log com/view
Slope test: slope = -0.0974, t(123) = -0.586, p = 0.5592; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Linking to prior knowledge =
1.1415 - 0.2076 * log com/view
Slope test: slope = -0.2076, t(123) = -1.771, p = 0.0791; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Active engagement = -0.0076 -
0.0659 * log com/view
Slope test: slope = -0.0659, t(123) = -0.535, p = 0.5939; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Direct addressing = 1.9190 +
0.0414 * log com/view
Slope test: slope = 0.0414, t(123) = 0.262, p = 0.7936; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Use of examples = 1.6728 -
0.0926 * log com/view
Slope test: slope = -0.0926, t(123) = -0.699, p = 0.4861; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Design of visualizations =
1.5171 - 0.1243 * log com/view
Slope test: slope = -0.1243, t(123) = -1.029, p = 0.3054; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Matching visualizations-text =
1.7584 - 0.1986 * log com/view
Slope test: slope = -0.1986, t(123) = -1.918, p = 0.0575; the
slope is not statistically significant at alpha = 0.050.
Regression equation: Predicted Language is comprehensive =
1.6861 - 0.3206 * log com/view
Slope test: slope = -0.3206, t(123) = -4.036, p = <0.001; the
slope is statistically significant at alpha = 0.050.
Regression equation: Predicted Language is precise = 1.5674 -
0.2825 * log com/view
Slope test: slope = -0.2825, t(123) = -2.325, p = 0.0217; the
slope is statistically significant at alpha = 0.050.
Regression equation: Predicted Coherent overall structure =
1.9384 - 0.0834 * log com/view
Slope test: slope = -0.0834, t(123) = -0.875, p = 0.3833; the
slope is not statistically significant at alpha = 0.050.
Regression equation reports the fitted line for each
outcome-predictor pair.Slope is the estimated change in the outcome score for
a one-unit increase in the log engagement predictor.p < alpha = Yes means the slope is statistically
significant at the alpha level specified in the YAML parameter
section.R^2 is the proportion of outcome variation explained by
the single predictor in that simple regression.params$alpha
if you want a different significance threshold.