Range-preserving two-sample t-test for comparing means.
two.sample.mean(x, y, transformation = c("none", "log", "logit"),
alternative = c("two.sided", "less", "greater"), paired = FALSE,
alpha = 0.05, plot.ci = TRUE, plot.ici = TRUE,
ici.interval = NULL, add.individual.ci = TRUE, by.ici = 0.5,
xlab.ici = "", rounds = 3, rounds.plot = NULL,
ci.interval = NULL, by.ci = 0.5, name.x = NULL, name.y = NULL,
pool.mean = FALSE, logit.interval = NULL, rho = NULL,
tol = 1e-07)A vector specifying the first sample.
A vector specifying the second sample.
A character string specifying the transformation on the sample means; "none" for real-valued data, "log" for positive-valued data, and "logit" for data in a fixed interval. The default option is "none".
A character string specifying the alternative hypothesis; "two.sided" for two-tailed, "less" for left-tailed, and "greater" for right-tailed alternative hypothesis. The default option is "two.sided".
A boolean specifying whether or not the samples are paired or independent. The default option is FALSE.
A numeric specifying the significance level. The default option is 0.05.
A boolean specifying whether or not the deviation between the two samples should be plotted. The default option is TRUE.
A boolean specifying whether or not the inferential confidence intervals for the two samples should be plotted. The default option is TRUE.
A vector with two elements specifying the range of values for the plot of inferential confidence intervals. The default option is NULL, in which case, an appropriate range is automatically specified.
A boolean specifying whether or not the confidence intervals with the confidence level implied by alpha should also be plotted. The default option is TRUE.
A numeric specifying te scales in the plot for ici.interval. The default option is 0.5.
A character string specifying the x axis labels used for the inferential confidence intervals and confidence intervals. The default option is "".
A numeric specifying the number of decimal places to be rounded. The default option is 3.
A numeric specifying the number of decimal places to be rounded. The default option is NULL, in which case it is set equal to rounds.
A vector with two elements specifying the range of values for the plot of confidence intervals. The default option is NULL, in which case, an appropriate range is automatically specified.
A numeric specifying te scales in the plot for ci.interval. The default option is 0.5.
A character string specifying the label for the x variable. The default option is NULL, in which case, it is set to "x".
A character string specifying the label for the y variable. The default option is NULL, in which case, it is set to "y".
A boolean specifying whether or not the sample means should be pooled for the degrees of freedom. The default option is FALSE.
A vector with two elements specifying the lower and upper bound if logit transformation is used. The default option is NULL.
A numeric specifying the correlation coefficient between the two samples. The default option is NULL, in which case, the sample correlation coefficient is estimated automatically.
A numeric specifying the cut-off value for a numerical zero. The default option is 1e-7.
A data frame displaying the effect size estimate, lower and upper bound of the effect size confidence interval, and the degrees of freedom.
A data frame displaying the sample mean for both x and y, lower and upper bounds of the inferential confidence intervals, the degrees of freedom of the inferential confidence intervals, the inferential significance level, and the significance level.
A data frame displaying the test statistic and p-value of the generalized two-sample t-test.
A data frame displaying the sample mean for both x and y, lower and upper bounds of the individual confidence intervals, the degrees of freedom of the individual confidence intervals, the sample standard deviations, and the significance level.
A data frame displaying Cohen's d and either log ratio (for transformation="log") or log odds (for transformation="logit").
# NOT RUN {
set.seed(123)
x<-runif(10)
y<-runif(15)
two.sample.mean(x,y,"logit","two.sided",paired=FALSE, ici.interval=c(0,1),
by.ici=0.2, logit.interval=c(0,1), rounds=2, name.x="xvar", name.y="yvar")
# }
Run the code above in your browser using DataLab