An R function: OLS/Robust scaled mass index

R code