## continue the RLGH example from ?join
example(join)
## fit the MAT model using the squared chord distance measure
swap.mat <- mat(swapdiat, swappH, method = "SQchord")
## model residuals
resid(swap.mat) # uses abbreviated form
## model residuals using 10 analogues and
## weighted averages
resid(swap.mat, k = 10, weighted = TRUE)
Run the code above in your browser using DataLab