non-conformable arrays in chi-square test

5 Views Asked by At

hey there can i please get assistance with the following error non-conformable arrays i want to perform a chi-square test but i keep getting an error message Heres a copy of my output : rbind(obs.use, exp.use) 1 2 6 7 9 obs.use 300.0000 473.00000 131.0000 300.00000 473.0000 exp.use 545.5172 28.89943 170.1494 35.71839 123.7155 Warning message: In rbind(obs.use, exp.use) : number of columns of result is not a multiple of vector length (arg 1)

step 3: compare observed and expected with a chi-square statistic

(X2.stat <- sum((obs.use - exp.use)^2 / exp.use)) Error in obs.use - exp.use : non-conformable arrays

I tried it initially with different data and the code ran smoothly with no error

0

There are 0 best solutions below