Math, Stats, Julia, Predictions, Linear Regression.
plot!(pred.x, pr.prediction, label="linear", linewidth=3) # plot Image by author Residual analysis using GLM, LinearAlgebra, StatsPlots, DataFrames, Plots, Measures; pyplot() using StableRNGs; rng = StableRNG(100); df = DataFrame(Y = rand(rng, 12), x = 1:12) df n = size(df)[1] model = lm(@formula(Y