Reputation: 541
I am using var.test and I want to retrive the p-value. any suggestion?
x <- rnorm(50, mean = 0, sd = 2)
y <- rnorm(30, mean = 1, sd = 1)
var.test(x, y)
F test to compare two variances
data: x and y F = 5.6877, num df = 49, denom df = 29, p-value = 3.839e-06 alternative hypothesis: true ratio of variances is not equal to 1 95 percent confidence interval: 2.85764 10.70096 sample estimates: ratio of variances 5.687715
Upvotes: 2
Views: 1018
Reputation: 21432
test <- var.test(x, y)
test$p.value
[1] 0.0001575875
Check out test$
to see all the options for statistics
Upvotes: 6