On 5/22/2018 2:32 AM, Rui Barradas wrote:
bootMedianSE <- function(data, indices){ d <- data[indices, ] fit <- rq(crp ~ bmi + glucose, tau = 0.5, data = d) ypred <- predict(fit) y <- d$crp median(y - ypred)^2 }
since the OP is looking for the "median squared error", shouldn't the final line of the function be
median((y - ypred)^2) Dan -- Daniel Nordlund Port Townsend, WA USA ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.