search for: shape_1

Displaying 1 result from an estimated 1 matches for "shape_1".

Did you mean: shape1
2002 Apr 22
3
glm() function not finding the maximum
...7.19, 88.52, 118.55, 151.9, 2.7, 156.41, 21.79, 272.27, 23.16, 32.07, 6325.23, 92.37, 8340.04, 51.08, 55.59, 94.08, 69.98, 554.13, 104.88, 170.15, 945.1, 143.52) #Fits data to a gamma distribution using glm() gamma1_function(data){ n_length(data) m_summary(glm(data~1, family=Gamma(link=identity))) shape_1/as.numeric(m$disp) scale_as.numeric(m$coeff[1]*m$disp) dev.res_-2*log(dgamma(data,shape=shape,scale=scale)) loglik_sum(dev.res) #actually -2 * log like list(loglik=loglik,par=c(shape,scale)) } #Fits data to a gamma distribution "by hand" using optim() gamma2_function(data){ n_length(d...