Statistical Methods
Transfer gamma parameters without confusing rate and scale
Define the task
A gamma distribution uses a positive shape and either a positive rate or its reciprocal scale. Record both the numerical parameter and its role. Rate has reciprocal outcome units, while scale has outcome units. Use a dimensional check before copying values from a model specification into a simulation call.
Carry out the check
For shape a and scale s, mean is a×s and variance is a×s². With rate b, the same quantities are a/b and a/b². Compute these moments on both sides of a transfer. If the expected center changes, stop and resolve the convention before comparing simulation output.
Worked hypothetical example
For a hypothetical shape of 4 and rate of 2 per hour, the equivalent scale is 0.5 hours. The mean is two hours and variance is one squared hour. Accidentally treating the rate value of 2 as a scale produces mean eight hours and variance sixteen squared hours. Store the intended mean and variance beside the original parameters so a receiving pipeline has a quick reproducibility check. Estimated parameters also require their uncertainty and fitting assumptions.
Method checked 11 November 2026 against R documentation: The Gamma Distribution.