Warning: file_get_contents(/data/phpspider/zhask/data//catemap/4/r/73.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
R 适用于高计数数据-Inf&;楠_R_Poisson_Goodness Of Fit - Fatal编程技术网

R 适用于高计数数据-Inf&;楠

R 适用于高计数数据-Inf&;楠,r,poisson,goodness-of-fit,R,Poisson,Goodness Of Fit,我有高计数数据,并从vcd包中应用goodfit,如下所示: fishdata <- read.csv("http://dl.dropbox.com/s/4w0utkqdhqribl4/fishdata.csv", header=T) attach(fishdata) require(vcd) dat <- fishdata$inlandfao gf <- goodfit(dat, method="ML") gf2 <- goodfit(dat, method="MinC

我有高计数数据,并从
vcd
包中应用
goodfit
,如下所示:

fishdata <- read.csv("http://dl.dropbox.com/s/4w0utkqdhqribl4/fishdata.csv", header=T)
attach(fishdata)
require(vcd)
dat <- fishdata$inlandfao
gf <- goodfit(dat, method="ML")
gf2 <- goodfit(dat, method="MinChisq")
    > summary(gf); summary(gf2)

         Goodness-of-fit test for poisson distribution

                 X^2 df P(> X^2)
Likelihood Ratio Inf 60        0

         Goodness-of-fit test for poisson distribution

        X^2      df P(> X^2)
Pearson NaN 1218936      NaN
Warning message:
In summary.goodfit(gf2) : Chi-squared approximation may be incorrect

fishdata对于
gf
,X^2值非常高,几乎是无限高。X^2值越高,P值越低。我不知道MinChisq是如何工作的,但1218936自由度闻起来很可疑。可能是因为DF太多,无法准确计算X^2值(因此发出警告)?但是,我建议您重新考虑您的分析。首先绘制数据,然后根据要回答的问题确定要适合的模型。尝试
库(重塑2);图书馆(GG2);fd