这是什么意思时,两种模式之间的方差分析不产生R A p值?

问题描述 投票:0回答:1

我有两个小数据集:

infected.data.r.p <- structure(list(MLH = c(0.520408163265306, 0.436170212765957, 
0.344086021505376, 0.423076923076923, 0.406976744186047), ColGrowthCL_6 = c(5.923728814, 
0.283950617, 0.377358491, 1.728070175, 0.2)), .Names = c("MLH", 
"ColGrowthCL_6"), row.names = c("12", "22", "28", "30", "34"), class = "data.frame")

uninfected.sampling <- structure(list(MLH = c(0.524271844660194, 0.457446808510638, 
0.354838709677419, 0.398058252427184, 0.436893203883495), ColGrowthCL_6 = c(4.401639344, 
4.827586207, 6.387096774, 6.320754717, 4.225490196)), .Names = c("MLH", 
"ColGrowthCL_6"), row.names = c("218", "18", "21", "212", "99"
), class = "data.frame")

当我尝试使用R(见下文),方差分析()语法这两款车型相比,它不能产生p值。我不相信这是造成问题的两个数据集的性质(虽然我也很好奇究竟是两个数据集的结构之间不同的),但我想这非常好可能是问题。谢谢!

型号比较语法:

infected.model<-glm(formula=as.formula(ColGrowthCL_6~MLH), family=poisson, infected.data.r.p)
uninfected.model<-glm(formula=as.formula(ColGrowthCL_6~MLH), family=poisson, uninfected.sampling)    

compare<-anova(infected.model,uninfected.model,test="Chisq")
print(compare)
summary(compare)
r linear-regression anova model-comparison
1个回答
3
投票

我相信你只能比较是来自同一数据集模型。因此,与卡方比较两个(嵌套)模型时,它需要来自同一数据集 - 也许这就是为什么没有被计算您的p值。

© www.soinside.com 2019 - 2024. All rights reserved.