chisq.test(x, y = NULL, correct = TRUE,
p = rep(1/length(x), length(x)), rescale.p = FALSE,
simulate.p.value = FALSE, B = 2000)```
in R
I could not find anything in the documentation. I must not have searched enough, what can it be?
Best,
Arin
LoadError: MethodError: `ChisqTest` has no method matching ChisqTest(::Array{Int64,1}, ::Array{Int64,1})
Closest candidates are:
ChisqTest{T<:Integer}(::AbstractArray{T<:Integer,1}, ::AbstractArray{T<:Integer,1}, !Matched::Tuple{UnitRange{T<:Integer},UnitRange{T<:Integer}})
ChisqTest{T<:Integer}(::AbstractArray{T<:Integer,1}, ::AbstractArray{T<:Integer,1}, !Matched::T<:Integer)
ChisqTest{T<:Integer,U<:AbstractFloat}(::AbstractArray{T<:Integer,1}, !Matched::Array{U<:AbstractFloat,1})
...
while loading In[118], in expression starting on line 1
ChisqTest([1,2,3,4],[1,2,2,4], 4)> chisq.test(matrix(c(1,0,0,0,0,1,1,0,0,0,0,0,0,0,0,1),nrow = 4,ncol = 4))
Pearson's Chi-squared test
data: matrix(c(1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 1), nrow = 4, ncol = 4)
X-squared = NaN, df = 9, p-value = NA
Warning message:
In chisq.test(matrix(c(1, 0, 0, 0, 0, 1, 1, 0, 0, 0, 0, 0, 0, 0, :
Chi-squared approximation may be incorrect> chisq.test(c(1,2,3,4),c(1,2,2,4))
Pearson's Chi-squared test
data: c(1, 2, 3, 4) and c(1, 2, 2, 4)
X-squared = 8, df = 6, p-value = 0.2381
julia> ChisqTest([1 0 0; 0 1 0; 0 1 0; 0 0 1])
Pearson's Chi-square Test
-------------------------
Population details:
parameter of interest: Multinomial Probabilities
value under h_0: [0.0625,0.0625,0.0625,0.0625,0.125,0.125,0.125,0.125,0.0625,0.0625,0.0625,0.0625]
point estimate: [0.25,0.0,0.0,0.0,0.0,0.25,0.25,0.0,0.0,0.0,0.0,0.25]
95% confidence interval: [(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0),(0.0,1.0)]
Test summary:
outcome with 95% confidence: fail to reject h_0
two-sided p-value: 0.23810330555354436 (not significant)
Details:
Sample size: 4
statistic: 8.0
degrees of freedom: 6
residuals: [1.5,-0.5,-0.5,-0.5,-0.7071067811865475,0.7071067811865475,0.7071067811865475,-0.7071067811865475,-0.5,-0.5,-0.5,1.5]
std. residuals: [2.0,-0.6666666666666666,-0.6666666666666666,-0.6666666666666666,-1.1547005383792517,1.1547005383792517,1.1547005383792517,-1.1547005383792517,-0.6666666666666666,-0.666666
6666666666,-0.6666666666666666,2.0]