This content has been marked as final.
Show 1 reply

1. Re: Chi square reading first two lines of table  R Integration
Mary Solbrig Nov 11, 2014 11:09 AM (in response to Rachel Factor)I am confused why you are using "INDEX()=1" and "INDEX()=2" as your arguments. This would mean that the variables a and b in the code are vectors of true/false values.
From the question, my guess is that you would like a to be the vector of Number of Students from School A and b the vector of students from school B, so that with the example data a = c(100, 30, 200) and b=(200,25,400). Is this correct?
If so, then I would suggest creating new fields to return counts for school A and school B. I've attached a workbook that uses your example data to return a p.value of .005762.
If this isn't correct, could you provide an example of the code you are running in R for comparison?

Example chi.squared.twbx 17.8 KB
