Displaying 1 result from an estimated 1 matches for "sq_error".
Did you mean:
so_error
2018 May 08
4
Average of results coming from B=100 repetitions (looping)
...oefficients
HBR_intercept <- as.numeric(HBR$coefficients[1])
HBR_coefA <- as.numeric(HBR$coefficients[2])
HBR_coefB <- as.numeric(HBR$coefficients[3])
# Predict response on testing data
Testing$pred <- HBR_intercept + HBR_coefA * Testing$A + HBR_coefB *Testing$B
# Get errors
Testing$sq_error <- (Testing$D-Testing$pred)^2
Testing$abs_error <- abs(Testing$D-Testing$pred)?
MedAe <- median(Testing$abs_error)
MedAe
MedAeSQ <-median(Testing$sq_error)
MedAeSQ
lst[i]<-MedAe
}
lst
mean(lst)
lst$mean
######################?