Displaying 3 results from an estimated 3 matches for "horsekicks".
2012 Aug 21
2
Entering a table
I'm trying to enter a frequency table manually so that I can run a
goodness of fit test (I only have the frequencies, I don't have the
raw data).
So for example, let's say I want to re-create the HorseKicks table:
library(vcd)
data(HorseKicks)
str(HorseKicks)
'table' int [1:5(1d)] 109 65 22 3 1
- attr(*, "dimnames")=List of 1
..$ nDeaths: chr [1:5] "0" "1" "2" "3" ...
I tried this the following but it didn't work:
vex <- matr...
2001 Nov 24
2
horsekicks
Dear friends. I have these well known data on horsekicks:
years <- c(109, 65, 22, 3 , 1, 0)
deaths <- 0:5
and get a nice but wrong fit from
summary(z1 <- glm(years~deaths,family=poisson))
Can I take away the intercept ?
Best wishes
Troels Ring, Aalborg
-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-
r-hel...
2009 Jul 23
1
goodfit() in vcd package: computation of chi-squared
I have troubles understanding how goodfit() function in the vcd package
computes the Pearson coefficient. Can anybody provide more information
on the computation?
In particular, for HorseKicks data in vcd package, goodfit() yields
> oo <- goodfit(HorseKicks,type="poisson",method="MinChisq")
> summary(oo)
Goodness-of-fit test for poisson distribution
X^2 df P(> X^2)
Pearson 0.594649 3 0.8976563
Warning message:
In summary.goodfit(...