[R] chi squared goodness of fit test with R

Ian Fiske ianfiske at gmail.com
Wed Feb 4 16:19:51 CET 2009


You might try the cut() function to convert your data from a continuous
measure into an ordinal factor.  Then use the table() function to get your
contingency table.

The R help system is very extensive.  Type "?cut" to get the help on the
function cut().  This works with all functions.  Look at the examples at the
bottom of the help.

You might want to run through "An Introduction to R" which is available
through the help menu.

Good luck,
Ian





evrim akar wrote:
> 
> Dear R users,
> 
> I am a master student in Mathematics and I am writing my thesis in
> statistics. I need to use R and unfortunately I do not have any experience
> with a computer program. Could you please help me about chi squared
> goodness
> of fit test with R? In R-help website I saw a message about how to do that
> but I do not know how to cut the data into bins and calculate the expected
> numbers in each bin. Moreover I have to count the observed data in each
> bin
> and I do not know how to do that either. I really need help as its an
> essential part of my study.
> 
> I appreciate if you could help.
> 
> 
> Thank you in advance,
> 
> regards,
> 
> 	[[alternative HTML version deleted]]
> 
> ______________________________________________
> R-help at 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.
> 
> 

-- 
View this message in context: http://www.nabble.com/chi-squared-goodness-of-fit-test-with-R-tp21826916p21832544.html
Sent from the R help mailing list archive at Nabble.com.




More information about the R-help mailing list