brglm2
brglm2 copied to clipboard
Profiling methods
Hi Ioannis,
I am trying to do profiling for a poisson glm model with method = "brglmFit" which gives an error and "confint" produces the wald CI. The package's R document doesn't mention profiling. Could you advise please? Below is a gamma model producing similar errors and results. (In gaussian and binomial models, this happens only for type = "AS_median").
Thanks, Serveh
data("coalition", package = "brglm2")
## The maximum likelihood fit with log link
coalitionML <- glm(duration ~ fract + numst2, family = Gamma, data = coalition)
## Bias reduced estimation of the dispersion parameter
coalitionBRi <- glm(duration ~ fract + numst2, family = Gamma, data = coalition, method = "brglmFit")
profile(coalitionML) #no-error
confint(coalitionML) #profile CI
#confint(profile(coalitionML)) #what is this one?
confint.default(coalitionML) #wald CI
profile(coalitionBRi)
## Error in profile.glm(coalitionBRi): profiling has found a better solution, so original fit had not converged
confint(coalitionBRi) #wald CI
confint.default(coalitionBRi) #wald CI
Hi Serveh,
Profiling methods have not been implemented yet for objects coming from brglm2, which is the reason you are getting errors. But, they are in the pipeline.
Best regards Ioannis
On 2023-05-19 at 02:34 -07, ServehSharifi @.***> wrote...
Hi Ioannis,
I am trying to do profiling for a poisson glm model with method = "brglmFit" which gives an error and "confint" produces the wald CI. The package's R document doesn't mention profiling. Could you advise please? Below is a gamma model producing similar errors and results. (In gaussian and binomial models, this happens only for type = "AS_median").
Thanks, Serveh
data("coalition", package = "brglm2")
The maximum likelihood fit with log link
coalitionML <- glm(duration ~ fract + numst2, family = Gamma, data = coalition)
Bias reduced estimation of the dispersion parameter
coalitionBRi <- glm(duration ~ fract + numst2, family = Gamma, data = coalition, method = "brglmFit")
profile(coalitionML) #no-error confint(coalitionML) #profile CI #confint(profile(coalitionML)) #what is this one? confint.default(coalitionML) #wald CI
profile(coalitionBRi)
Error in profile.glm(coalitionBRi): profiling has found a better solution, so original fit had not
converged confint(coalitionBRi) #wald CI confint.default(coalitionBRi) #wald CI
— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.
-- Ioannis Kosmidis Professor of Statistics, University of Warwick Turing Fellow, Alan Turing Institute Email: @.*** Twitter: https://twitter.com/IKosmidis_ Webpage: https://www.ikosmidis.com