A simple utility function that is used in fitting a GLM, creating a matrix of "x" values for use in the polynomial part of a xep-type model.
rmat(r, distr)
array with length(r)
rows and p columns, where p is the number
of parameters in the glm (including the intercept). The first column is all
1s, and the remaining columns are functions of r, specifically, log(r), r,
r^2, r^3, or 1/r, depending on what the distribution requires.
vector of distances (>=0)
name of the distribution