brglm2
brglm2 copied to clipboard
error when trying brnb for negative binomial
Hello,
I was excited to find this package to solve my complete separation problem. My count data is overdispersed so need to use the negative binomial family, which I understand is run using brnb(). I keep getting this error: NA/NaN/Inf in foreign function call (arg 1), even though I am specifying all the necessary terms:
salmonella_fm <- production ~ Treat_comboSource_Salinity +Rarity+ Region+Treat_comboTurion_length_num+replanted.x
N_T_6_2020_nbn <- brglm2::brnb(salmonella_fm, data=turion_harvest_2021_all_gen_initial_turion,link = "log",transformation = "inverse", type = "AS_mean")
I've noticed that the error disappears if I use type="ML" but all other types trigger the error.
Could you please advise?
Thanks!
-Carrie