Learn R Programming

asympTest (version 0.1.4)

seMean: se functions

Description

se functions compute the Standard Error of respectively mean, variance, difference of means, of variances and ratio of means and variances.

Usage

seMean(x,…)
# S3 method for default
seMean(x,…)
seVar(x,…)
# S3 method for default
seVar(x,…)
seDMean(x,…)
# S3 method for default
seDMean(x, y, rho = 1, …)
seDMeanG(x,…)
# S3 method for default
seDMeanG(x, y,…)
seDVar(x,…)
# S3 method for default
seDVar(x, y, rho = 1, …)
seRMean(x,…)
# S3 method for default
seRMean(x, y, r0,…)
seRVar(x,…)
# S3 method for default
seRVar(x, y, r0,…)

Arguments

x

a (non-empty) numeric vector of data values.

y

an optional (non-empty) numeric vector of data values.

rho

optional parameter for penalization (or enhancement) of the contribution of the second parameter.

r0

an optional parameter for ratio of means (seRMean) or variances (seRVar). It acts as parameter r in seDMean and seDVar. Defaults are mean(x)/mean(y) in seRMean and var(x)/var(y) for seRVar.

further arguments to be passed to or from methods.

Value

Return the value of the estimated standard error for the corresponding parameter.

Details

se functions performs classical standard error estimation for parameters mean, variance, difference of means or variances, ratio of means or variances.

References

Coeurjolly, J.F. Drouilhet, R. Lafaye de Micheaux, P. Robineau, J.F. (2008) asympTest: a simple R package for performing classical parametric statistical tests and confidence intervals in large samples, The R Journal

See Also

asymp.test that used estimated standard error for asymptotic parametric tests.

Examples

Run this code
# NOT RUN {
x <- rnorm(70, mean = 1, sd = 2)
y <- rnorm(50, mean = 2, sd = 1)
## mean statistic 
asymp.test(x)$stat
mean(x)/seMean(x)
## variance statistic
asymp.test(x,param="var",alt="l",param0=2)$stat
(var(x)-2)/seVar(x)
## difference of means statistic
asymp.test(x,y)$stat
(mean(x)-mean(y))/seDMean(x,y)
# }

Run the code above in your browser using DataLab