Description Usage Arguments Details Value Author(s) References See Also Examples
Performs one and two sample asymptotic (no gaussian assumption on distribution) parametric tests on vectors of data.
1 2 3 4 5 6 7 8  asymp.test(x,...)
## Default S3 method:
asymp.test(x, y = NULL,
parameter = c("mean", "var", "dMean", "dVar", "rMean", "rVar"),
alternative = c("two.sided", "less", "greater"),
reference = 0, conf.level = 0.95, rho = 1, ...)
## S3 method for class 'formula'
asymp.test(formula, data, subset, na.action, ...)

x 
a (nonempty) numeric vector of data values. 
y 
an optional (nonempty) numeric vector of data values. 
parameter 
a character string specifying the parameter under testing, must be one of "mean", "var", "dMean" (default), "dVar", "rMean", "rVar" 
alternative 
a character string specifying the alternative hypothesis, must be one of "two.sided" (default), "greater" or "less". You can specify just the initial letter. 
reference 
a number indicating the reference value of the parameter (difference or ratio true value for two sample test) 
conf.level 
confidence level of the interval. 
rho 
optional parameter (only used for parameters "dMean" and "dVar") for penalization (or enhancement) of the contribution of the second parameter. 
formula 
a formula of the form 
data 
an optional matrix or data frame (or similar: see

subset 
an optional vector specifying a subset of observations to be used. 
na.action 
a function which indicates what should happen when
the data contain 
... 
further arguments to be passed to or from methods. 
Asymptotic parametric test and confidence intervals are based on the following unified statistic :
est(theta)(Y)theta / est(var(est(theta)))(Y)
which asymptotically follows a N(0,1).
theta stands for the parameter under testing (mean/variance, difference/ratio of means or variances).
The term est(var(est(theta))) is calculated by the adhoc seTheta function (see seMean
).
A list with class "htest" containing the following components:
statistic 
the value of the unified θ statistic. 
p.value 
the pvalue for the test. 
conf.int 
a confidence interval for the parameter appropriate to the specified alternative hypothesis. 
estimate 
the estimated parameter depending on whether it wasa onesample test or a twosample test (in which case the estimated parameter can be a difference/ratio in means/variances). 
null.value 
the specified hypothesized value of parameter depending on whether it was a onesample test or a twosample test. 
alternative 
a character string describing the alternative hypothesis. 
method 
a character string indicating what type of asymptotictest was performed. 
data.name 
a character string giving the name(s) of the data. 
J.F. Coeurjolly, R. Drouilhet, P. Lafaye de Micheaux, J.F. Robineau
C oeurjolly, J.F. Drouilhet, R. Lafaye de Micheaux, P. Robineau, J.F. (2009) asympTest: a simple R package for performing classical parametric statistical tests and confidence intervals in large samples, The R Journal
t.test
, var.test
for normal distributed data.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15  ## one sample
x < rnorm(70, mean = 1, sd = 2)
asymp.test(x)
asymp.test(x,par="mean",alt="g")
asymp.test(x,par="mean",alt="l",ref=2)
asymp.test(x,par="var",alt="g")
asymp.test(x,par="var",alt="l",ref=2)
## two samples
y < rnorm(50, mean = 2, sd = 1)
asymp.test(x,y)
asymp.test(x,y,"rMean","l",.75)
asymp.test(x,y,"dMean","l",0,rho=.75)
asymp.test(x,y,"dVar")
## Formula interface
asymp.test(uptake~Type,data=CO2)

Onesample asymptotic mean test
data: x
statistic = 3.1968, pvalue = 0.00139
alternative hypothesis: true mean is not equal to 0
95 percent confidence interval:
0.3210356 1.3385236
sample estimates:
mean
0.8297796
Onesample asymptotic mean test
data: x
statistic = 3.1968, pvalue = 0.0006949
alternative hypothesis: true mean is greater than 0
95 percent confidence interval:
0.4028282 Inf
sample estimates:
mean
0.8297796
Onesample asymptotic mean test
data: x
statistic = 4.5083, pvalue = 3.267e06
alternative hypothesis: true mean is less than 2
95 percent confidence interval:
Inf 1.256731
sample estimates:
mean
0.8297796
Onesample asymptotic variance test
data: x
statistic = 5.8971, pvalue = 1.85e09
alternative hypothesis: true variance is greater than 0
95 percent confidence interval:
3.400785 Inf
sample estimates:
variance
4.71629
Onesample asymptotic variance test
data: x
statistic = 3.3963, pvalue = 0.9997
alternative hypothesis: true variance is less than 2
95 percent confidence interval:
Inf 6.031794
sample estimates:
variance
4.71629
Twosample asymptotic difference of means test
data: x and y
statistic = 4.1333, pvalue = 3.576e05
alternative hypothesis: true difference of means is not equal to 0
95 percent confidence interval:
1.7608216 0.6280426
sample estimates:
difference of means
1.194432
Twosample asymptotic ratio of means test
data: x and y
statistic = 2.6002, pvalue = 0.004658
alternative hypothesis: true ratio of means is less than 0.75
95 percent confidence interval:
Inf 0.6250514
sample estimates:
ratio of means
0.4099273
Twosample asymptotic difference of (weighted) means test
data: x and y
statistic = 2.4896, pvalue = 0.006394
alternative hypothesis: true difference of (weighted) means is less than 0
95 percent confidence interval:
Inf 0.2335817
sample estimates:
difference of (weighted) means
0.6883792
Twosample asymptotic difference of variances test
data: x and y
statistic = 4.771, pvalue = 1.833e06
alternative hypothesis: true difference of variances is not equal to 0
95 percent confidence interval:
2.303520 5.515698
sample estimates:
difference of variances
3.909609
Twosample asymptotic difference of means test
data: uptake by Type
statistic = 6.5969, pvalue = 4.198e11
alternative hypothesis: true difference of means is not equal to 0
95 percent confidence interval:
8.898332 16.420716
sample estimates:
difference of means
12.65952
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.