This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Creates a 3D plot to demonstrate how a combination of OLS parameters minimizes residual sum of squares | |
# set values for X | |
x <- seq(-50, 50, 1) | |
# Y as a function of X with random error | |
y <- NA | |
for (i in 1:length(x)) { | |
y[i] <- 2*x[i] + rnorm(1, 0, 5) | |
} |
NewerOlder