data(ereturns)
fm <- lad(m.marietta ~ CRSP, data = ereturns)
r <- residuals(fm, type = "quantile")
obs <- c(8,15,34)
plot(r, ylim = c(-2,6), ylab = "quantile residual")
abline(h = 0, lwd = 2, col = "gray75")
abline(h = c(-2,2), lwd = 2, lty = 2, col = "red")
text(obs, r[obs], as.character(obs), pos = 3)
Run the code above in your browser using DataLab