GLM 返回阈值负值(截止)(在 R 中)

GLM returning negative value for threshold (cut-off)(in R)

我正在使用 GLM 进行物种分布建模。我有来自 GBIF (http://www.gbif.org/species/5846514) and bioclimatic data from Worldclim (http://worldclim.org/current) 的 Caiman crocodilus 物种的(南美)数据。我试图 运行 GLM 以模拟物种分布(使用 dismo 包):

modelGLM = pres ~ bioclim_10 + bioclim_11+ bioclim_16 + I(bioclim_16^2) + bioclim_17
GLM <- glm(modelGLM, family=binomial(link=logit), data=PresBackTrainRaw)
projecaoSuitability = predict(predictors, GLM, type='response')

到这里为止,一切看起来都很好,但是当我尝试获取阈值(截止)时,返回负值:

library(dismo)
> evaluation=evaluate(p=presencesTest,a=backgroundTest,m=GLM,x=predictors)
> thresholdValues=threshold(evaluation,'spec_sens')  
> thresholdValues    
> [1] -2.578797

由于 glm 输出(type='response')的范围从 0 到 1,负阈值没有意义。谁能帮我看看哪里出了问题?

解决方案(user20650提供):

evaluate中添加type='response'

library(dismo) evaluation=evaluate(p=presencesTest,a=backgroundTest,m=GLM,x=predictors,type='response') thresholdValues=threshold(evaluation,'spec_sens')
thresholdValues
[1] 0.07042211