Hi 2001,
Quick fyi- I just uploaded an edited version of PS5, i.e. different from the
version posted earlier today. The changes are minor, but should make parts
d-f clearer.
Also, note that the data is in a matrix, but R recognizes each element to be
a character. Most operations we use in R require numeric rather than
character elements so one fix is to use something like:
X <- matrix(data = NA, nrow = 23, ncol = 3)
colnames(X) <- c("Intercept","Temperature","Pressure")
X[,1] <- 1
X[,2] <- as.numeric(data[,3])
X[,3] <- as.numeric(data[,4])
y <- as.numeric(data[,2])
Cheers,
Jenn
Show replies by date