简体   繁体   English

拟泊松GLM的阶跃函数

[英]Step function for quasi poisson GLM

I'm trying to fit quasi-poisson GLMs and GAMs using the step function to perform backwards selection. 我正在尝试通过使用step函数执行向后选择来拟合拟泊松GLM和GAM。 I used the following code but R returned an error as it couldn't calculate the AIC. 我使用了以下代码,但R由于无法计算AIC而返回了错误。 The same model using a poisson distribution works but not quasi-poisson, is there any way to alter the function so it works? 使用泊松分布的相同模型有效,但拟泊松不起作用,是否有任何方法可以改变函数以使其起作用?

full.mod03q<-glm(Total.Positivo_2003~X.baix03 + Tot_PrevDesnut04
                 + Tot_HosDesid04 + Despesa_06 + prpnurb03 + prpnkid03
                 + dev03 + watertoilet03 + elec03 + dollpercap03
                 + abspov03 + gini03 + Importado.Outro.Municipio.Da.Uf_2003 
                 + Importado.Uf.Pais_2003 + elevation + floodplain + BIO1 
                 + BIO6 + BIO12 + deforestation_prop,
                 family="quasipoisson", offset=log(pop_2003), 
                 data=ama1@data)
step(full.mod03q, direction="backward")

AIC cannot be calculated at quasi-poisson models. 准泊松模型无法计算AIC。 Function "step" uses AIC for choosing more relevant variables to include in model. 函数“步骤”使用AIC选择更多相关变量以包含在模型中。 There is a "not purist" solution calculating "quasi-AIC". 有一个计算“准AIC”的“非纯粹主义者”解决方案。

I am fighting against same problem. 我正在同一个问题作斗争。 It appears can be solved at: 看来可以在以下位置解决:

https://cran.r-project.org/web/packages/bbmle/vignettes/quasi.pdf https://cran.r-project.org/web/packages/bbmle/vignettes/quasi.pdf

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM