GLM Poisson 认为我的数据集中有负值,抛出错误
GLM Poisson thinks I have negative values in my dataset, throws error
我正在尝试做泊松 GLM,但我仍然收到此错误
Poisson1 <- glm(Number.Flowers ~ Site, data = Flowering2, family="poisson")
Error in eval(family$initialize) :negative values not allowed for the 'Poisson' family
我的数据是计数数据,所有正值和零也是如此。可能发生了什么?
我的 CSV 文件是否可能包含隐藏的负值?
您的 CSV 文件可能在某些方面存在缺陷。尝试将其导入 R 的不同方法(fread、read.table 等)。检查 NA 或 NaN 问题。比较行数。
我正在尝试做泊松 GLM,但我仍然收到此错误
Poisson1 <- glm(Number.Flowers ~ Site, data = Flowering2, family="poisson")
Error in eval(family$initialize) :negative values not allowed for the 'Poisson' family
我的数据是计数数据,所有正值和零也是如此。可能发生了什么?
我的 CSV 文件是否可能包含隐藏的负值?
您的 CSV 文件可能在某些方面存在缺陷。尝试将其导入 R 的不同方法(fread、read.table 等)。检查 NA 或 NaN 问题。比较行数。