res_gamma: Estimates the parameters of a Gamma distribution from SDs
Description
This function calcualtes the parameters of a Gamma distribution
from the residuals from an individuals' own mean.
That is, the distribution of (standard) deviations from individuals'
own mean are calculated and then an estimate of the parameters of a
Gamma distribution are calculated.
Usage
res_gamma(x, ID)
Arguments
x
A data vector to operate on
ID
an ID variable of the same length as x
Value
a list of the shape (alpha) and rate (beta) parameters
and the mean and variance