[R] about chisq.test()

2010-05-19 Thread Dejian Zhao

Dear all,

I want to check whether 5 decimal data is 1:1:1:1:1. For example,
data = c(14.3,16.2,14.7,18.7,14.5)
Since chisq.test() can do the goodness-of-fit test, it becomes my 
choice. However, I find in the ?chisq.test help file that it requires 
non-negative integers! It seems that it is inappropriate to do the 
test using this function.


The function requires integer. But what if we input some decimals as 
mentioned above? Actually I did it and it seems goes well.


 data = c(14.3,16.2,14.7,18.7,14.5)
 chisq.test(data)
Chi-squared test for given probabilities
data:  data
X-squared = 0.8704, df = 4, p-value = 0.9288

Is this result reliable?
Thanks!

Dejian

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.


Re: [R] about chisq.test()

2010-05-19 Thread Marco Barbàra

 
 Is this result reliable?

No. chisq.test is a non parametric goodness-of-fit test for
*counts*. In my opinion you need a one sample t.test.

__
R-help@r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.