R code for Hilbe's book on LRM