Learn R Programming

testequavar (version 0.1.5)

equa4vartest: Bootstrap test for equality of four (4) population variances

Description

Testing equality of four (4) population variances against the alternative that all variances are not equal.

Usage

equa4vartest(x1, x2, x3, x4, a, B)

Value

list consisting of a non-numeric decision whether to reject the null hypothesis or not, the significance level, the number of bootstrap samples used, and the bootstrap P-value calculated using the Euclidean distance.

Arguments

x1

first sample vector of data or observations

x2

second sample vector of data or observations

x3

third sample vector of data or observations

x4

fourth sample vector of data or observations

a

significance level alpha

B

number of bootstrap samples. At least 500 is recommended.

References

Cahoy, DO (2010), A Bootstrap Test For Equality Of Variances, Computational Statistics & Data Analysis, 54(10), 2306-2316. tools:::Rd_expr_doi("10.1016/j.csda.2010.04.012")

Examples

Run this code


x1=sqrt(10)*runif(10, -sqrt(3), sqrt(3) )
x2=sqrt(1)*runif(10, -sqrt(3), sqrt(3) )
x3=sqrt(1)*runif(10, -sqrt(3), sqrt(3) )
x4=sqrt(1)*runif(10, -sqrt(3), sqrt(3) )
equa4vartest(x1,x2,x3, x4, a=0.05, B=500)



equa4vartest(rexp(10) ,rexp(10) ,rexp(10) , rexp(10),  a=0.01, B=1000)



Run the code above in your browser using DataLab