When will I use the argument var.equal=TRUE
or var.equal=FALSE
?
i haven't understood by reading the r documentation file.
Could you give me practical example to make it clear to me the situation of var.equal=TRUE or FALSE?
When will I use the argument var.equal=TRUE
or var.equal=FALSE
?
i haven't understood by reading the r documentation file.
Could you give me practical example to make it clear to me the situation of var.equal=TRUE or FALSE?
I have been a statistician for years and I advocate always using var.equal=FALSE
.
As you know, the T-test is a test for differences in means between two groups. By the Central Limit Theorem, the sampling distribution of that statistic is asymptotically normal. Approximating the variance of the limiting normal distribution of the sample difference in means for finite sample sizes requires an estimate of the effective degrees of freedom to correct for the joint estimation of the standard deviation $\sigma_1$ and $\sigma_2$ of the two groups along with the mean difference $\mu_d$.
Assuming that these variances are equal simplifies estimation but can egregiously miscalibrate the test when they are in fact different. The mild gains in power you get from simpler estimation are pretty much negligible for any modest sized $n$. So for that I say you never set the variances in groups to be equal.
car::levenTest
) and decide on basis of the result how to set var.equal
?
May 23, 2013 at 17:14