search for: model_glm

Displaying 2 results from an estimated 2 matches for "model_glm".

2012 Apr 14
1
basic question predict GLM offset
Hi, I know this is probably a basic question... But I don't seem to find the answer. I'm fitting a GLM with a Poisson family, and then tried to get a look at the predictions, however the offset does seem to be taken into consideration: model_glm=glm(cases~rhs(data$year,2003)+lhs(data$year,2003), offset=(log(population)), data=data, subset=28:36, family=poisson()) predict (model_glm, type="response") I get cases not rates... I've tried also model_glm=glm(cases~rhs(data$year,2003)+lhs(data$year,2003)+ offset(log(populat...
2002 Apr 22
3
glm() function not finding the maximum
Hello, I have found a problem with using the glm function with a gamma family. I have a vector of data, assumed to be generated by a gamma distribution. The parameters of this gamma distribution are estimated in two ways (i) using the glm() function, (ii) "by hand", using the optim() function. I find that the -2*likelihood at the maximum found by (i) is substantially larger than that