statistics - Chi-squared goodness of fit test in R -


I have a vector of observed values ​​and a vector of values ​​calculated with the model:

  real & lt; -c (1411,439,214,100,62,38,29,64) expected & lt; -c (1425.339 9.5,201.6,116.9,72.2,46.3,30.4,64.8)   

Now I'm using Chi-square goodness of fit testing to see that my model How well does it perform I have written the following:

  chisq.test (expected, actual)   

but it does not work. Can you help me with this?

X ^ 2 = 10.2 From 7 degrees of independence, you get an AP ~ 0.18.

  & gt; You must pass the required values ​​under the argument  p . Make sure that you measure your values ​​for the sum of 1.  
  & gt; Chisketast (genuine, p = expected / sum (expected)) Che-squared test for probability data given: Actual X-squared = 10.2581, df = 7, p-value = 0.1744   

What is testing X ^ 2 about this, you give the function a model ( required ) and ask - how likely is it that my viewed data Came from the population that "generated" required ?

Comments