| wle.var.test {wle} | R Documentation |
Performs an Weighted F test to compare the variances of two samples from normal populations. The WF-test is based on weighted likelihood.
wle.var.test(x, y, ratio = 1, alternative = c("two.sided", "less", "greater"),
conf.level = 0.95, x.root=1, y.root=1)
x, y |
fitted linear model objects (inheriting from class "wle.lm") or fitted normal model objects (inheriting from class "wle.normal"). |
ratio |
the hypothesized ratio of the population variances of
x and y. |
alternative |
the alternative hypothesis; must be one of
"two.sided" (default), "greater" or "less". You
can specify just the initial letter. |
conf.level |
confidence level for the returned confidence interval. |
x.root |
the 'x' root used. |
y.root |
the 'y' root used. |
The null hypothesis is that the ratio of the variances in the data to which the normal model (wle.normal) or linear models (wle.lm) x and y were fitted, is equal to ratio.
A list with class "htest" containing the following components:
statistic |
the value of the WF test statistic. |
parameter |
the degrees of the freedom of the WF distribtion of the test statistic. |
p.value |
the p-value of the test. |
conf.int |
a confidence interval for the ratio of the population variances. |
estimate |
the ratio of the sample variances from x and y. |
null.value |
the ratio of population variances under the null. |
alternative |
a character string describing the alternative hypothesis. |
method |
the string "WF test to compare two variances". |
data.name |
a character string giving the names of the data. |
Agostinelli, C., (1998). Inferenza statistica robusta basata sulla funzione di verosimiglianza pesata: alcuni sviluppi, Ph.D Thesis, Department of Statistics, University of Padova (in italian).
Agostinelli, C., (1998). Un approccio robusto alla verifica d'ipotesi basato sulla funzione di verosimiglianza pesata - Robust Testing Hypotheses via Weighted Likelihood function, submitted to {it Statistica}, revised february 2000 (in italian).
Agostinelli, C., Markatou, M. (2001) Test of hypotheses based on the Weighted Likelihood Methodology, in print {it Statistica Sinica} probably vol. 11, n. 2, Aprile 2001.
set.seed(1234) x <- rnorm(30,0,1) y <- rnorm(30,10,1) res.x <- wle.normal(x,group=5) res.y <- wle.normal(y,group=5) wle.var.test(res.x, res.y) # Do x and y have the same variance? set.seed(1234) x <- c(rnorm(30,0,1),rnorm(10,10,1)) y <- c(rnorm(30,10,1),rnorm(10,0,5)) res.x <- wle.normal(x,group=5,num.sol=2) res.y <- wle.normal(y,group=5) res.x wle.var.test(res.x, res.y, x.root=1) if (res.x$tot.sol>1) wle.var.test(res.x, res.y, x.root=2)