wle.t.test(x, y = NULL, alternative = c("two.sided", "less", "greater"),
mu = 0, paired = FALSE, var.equal = FALSE, conf.level = 0.95,
boot=30, group, num.sol=1, raf="HD", smooth=0.003,
tol=10^(-6), equal=10^(-3), max.iter=500)
"two.sided"
(default), "greater"
or
"less"
. You can specify just the initial letter.TRUE
then the pooled
variance is used to estimate the variance otherwise the Welch
approximation to the degrees of freedom is used.raf="HD"
: Hellinger Distance RAF,
raf="NED"
: Negative Exponential Disparity RAF,
raf="SCHI2"
: Symmetric Chi-Squared Disparity RAF.
tol
)."wle.t.test"
with the following components:"htest"
containing the following components: statistic
the value of the t-statistic.
parameters
the degrees of freedom for the t-statistic.
p.value
the p-value for the test.
conf.int
a confidence interval for the mean appropriate to the specified alternative hypothesis.
estimate
the estimated mean or difference in means depending on whether it was a one-sample test or a two-sample test.
null.value
the specified hypothesized value of the mean or mean difference depending on whether it was a one-sample test or a two-sample test.
alternative
a character string describing the alternative hypothesis.
method
a character string indicating what type of t-test was performed.
data.name
a character string giving the name(s) of the data.
x.weights
the weights related to the 'x' data.
y.weights
the weights related to the 'y' data.
x.root
the number of the 'x' root.
y.root
the number of the 'y' root.
NULL
.paired
is TRUE
then both x
and y
must
be specified and they must be the same length. Missing values are
removed (in pairs if paired
is TRUE
). If
var.equal
is TRUE
then the pooled estimate of the
variance is used. By default, if var.equal
is FALSE
then the variance is estimated separately for both groups and the
Welch modification to the degrees of freedom is used.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 {
Agostinelli, C., Markatou, M. (2001) Test of hypotheses based on the Weighted Likelihood Methodology, in print {
}
[object Object]
set.seed(1234)
x <- rnorm(20,0,1) y <- rnorm(20,6,1)
t.test(x,y) # P < 2.2e-16 wle.t.test(x,y,group=5) # P < 2.2e-16
t.test(x,y=c(y,250)) # P = 0.1419 -- NOT significant anymore wle.t.test(x,y=c(y,250),group=5) # P < 2.2e-16 -- still significant set.seed(1234)
# three roots for 'x' and three roots for 'y' # with nine t-test value res <- wle.t.test(x=c(rnorm(40,0,1),rnorm(40,10,1)), y=c(rnorm(40,0,1),rnorm(40,10,1)), group=4,num.sol=3,boot=100)
print(res) # print ALL the t-test print(res,x.root=1,y.root=1) # print the test associated to the # x.root=1,y.root=1
root.1.1 <- res$test[[1]][[1]] # access to the object associated # to the x.root=1,y.root=1
names(root.1.1)
set.seed(1234)
# one root and NOT significant t-test wle.t.test(x=c(rnorm(40,0,1),rnorm(40,10,1)), y=c(rnorm(40,0,1),rnorm(40,10,1)), group=4,num.sol=3,boot=100,paired=TRUE)