[R] chi-square test
J Dougherty
jwd at surewest.net
Wed Apr 9 09:02:51 CEST 2008
On Tuesday 08 April 2008 17:04:16 Roslina Zakaria wrote:
> Hi R-users,
> I would like to find the goodness of fit using Chi-suare test for my data
> below: xobs=observed data, xtwe=predicted data using tweedie,
> xgam=predicted data using gamma
>
> > xobs <- c(223,46,12,5,7,17)
> > xtwe <- c(217.33,39,14,18.33,6.67,14.67)
> > xgam <- c(224.67,37.33,12.33,15.33,5.33,15)
> >
> > chisq.test(xobs, xtwe = xtwe, rescale.p = TRUE)
>
> Error in chisq.test(xobs, xtwe = xtwe, rescale.p = TRUE) :
> unused argument(s) (xtwe = c(217.33, 39, 14, 18.33, 6.67, 14.67))
> chisq.test(x, p = p, rescale.p = TRUE)
> I'm not sure what's wrong with it.
> Thank you so much for your help.
>
>
Try this instead:
chisq.test(xobs, p=xtwe, rescale.p = TRUE)
The "help" file might be a little obscure.
JWDougherty
More information about the R-help
mailing list