R/plot.mra.R

Defines functions plot.mra

plot.mra <- function(x, ...){

  resid <- resid(x)
  fitted <- fitted(x)

  plot(fitted, resid, type = 'p',
       xlab = 'Fitted values', ylab = 'Residuals',
       main = 'Residuals vs Fitted')
  abline(h = 0, lty = 'dotted', col = 'grey')
  lines(lowess(fitted, resid), col = 'red')

}
zhangh12/iva documentation built on Aug. 16, 2019, 3:30 a.m.