data(stackloss)
X<-data.frame(stackloss$Air.Flow,stackloss$Water.Temp)
y<-stackloss$stack.loss
#calculate least squares estimates for starting point
m1<-lm(stack.loss~Air.Flow+Water.Temp,data=stackloss)$coefficients
robustRegH(y,X,beta=m1)
#If X matrix contained large values of H matrix (high influence points)
robustRegH(y,X,beta=m1,m=FALSE)Run the code above in your browser using DataLab