search for: hbr_coefb

Displaying 1 result from an estimated 1 matches for "hbr_coefb".

Did you mean: hbr_coefa
2018 May 08
4
Average of results coming from B=100 repetitions (looping)
...ple(1 :n,floor(p*n),replace=FALSE) # Sample training data Training =BIO [sam,] # Sample testing data Testing = BIO [-sam,] # Build the HBR model HBR<-hbrfit(D ~ A+B) # Grab the coefficients 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(Testin...