brglm2 icon indicating copy to clipboard operation
brglm2 copied to clipboard

Profiling methods

Open ikosmidis opened this issue 5 years ago • 2 comments

ikosmidis avatar Oct 12 '19 15:10 ikosmidis

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

ServehSharifi avatar May 19 '23 09:05 ServehSharifi

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

ikosmidis avatar Jun 01 '23 14:06 ikosmidis