# NOT RUN {
library(MASS)
data(stackloss)
LS <- lm(stack.loss ~ stack.x)
RB <- rlm(stack.loss ~ stack.x, psi = psi.huber, k = 1.345)
yy <- stack.loss
xx <- model.matrix(stack.loss ~ stack.x)
#With power function as variance function
WHM_p <- whm(yy, xx, var.function = "power", tuning.para = 1.345)
#With exponential function as variance function
WHM_e <- whm(yy, xx, var.function = "exponential", tuning.para = 1.345)
# }
Run the code above in your browser using DataLab