DiagBeta.R finished