Description Usage Arguments Value References Examples
Decision on hypothesis testing over two means is made by graphing two sample Sv-plot2s along with the threshold line. If the intersection point of two Sv-plot2s locates on or above the threshold line, the null hypothesis is rejected at specified significance level, otherwise, failed to reject.
1 2 3 4 |
X1 |
an n1 by 1 matrix, equivalently, a column vector of length n1, where n1 is number of observations. |
X2 |
an n2 by 1 matrix, equivalently, a column vector of length n2, where n2 is number of observations. |
paired |
for dependent samples TRUE, FALSE by default. |
eqlvar |
population variances are equal, FALSE by default. |
unkwnsigmas |
population standard deviations are unknown, TRUE by default. |
sigma1 |
population1 standard deviation, NULL by default. |
sigma2 |
population2 standard deviation, NULL by default. |
alpha |
significance level, alpha=0.05 by default. |
xlab |
x-axis label, x by default. |
title |
title of the plot, Two means: Hypothesis testing by Sv-plot2 by default. |
sam1col |
sample1 Sv-plot2 color, grey5 by default. |
sam2col |
sample2 Sv-plot2 color, grey45 by default. |
thrcol |
threshold color, black by default. |
... |
other graphical parameters. |
Decision on testing hypotheses over two population means by Sv-plot2.
Wijesuriya, U. A. (2020). Sv-plots for identifying characteristics of the distribution and testing hypotheses. Communications in Statistics-Simulation and Computation, doi: 10.1080/03610918.2020.1851716.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 | set.seed(5)
test2mu(X1=matrix(rnorm(10,mean=3,sd=2)),X2=matrix(rnorm(20,mean=4,sd=2.5)),
paired=FALSE,eqlvar=FALSE,unkwnsigmas=TRUE,
sigma1=NULL,sigma2=NULL,alpha=0.05,
sam1col="grey5",sam2col="grey45",thrcol="black")
test2mu(X1=matrix(rnorm(10,mean=3,sd=2)),X2=matrix(rnorm(20,mean=4,sd=2.5)),
paired=FALSE,eqlvar=TRUE,unkwnsigmas=TRUE,
sigma1=NULL,sigma2=NULL,alpha=0.05,
sam1col="grey5",sam2col="grey45",thrcol="black")
test2mu(X1=matrix(rnorm(50,mean=3,sd=2)),X2=matrix(rnorm(30,mean=4,sd=2.5)),
xlab="x",title="Two means: Hypothesis testing by Sv-plot2",
paired=FALSE,eqlvar=FALSE,unkwnsigmas=TRUE,
sigma1=NULL,sigma2=NULL,alpha=0.05,
sam1col="grey5",sam2col="grey45",thrcol="black")
test2mu(X1=matrix(rnorm(50,mean=3,sd=2)),X2=matrix(rnorm(30,mean=4,sd=2.5)),
paired=FALSE,eqlvar=FALSE,unkwnsigmas=FALSE,
sigma1=2,sigma2=4.920782,alpha=0.05,
sam1col="grey5",sam2col="grey45",thrcol="black")
X1=matrix(rnorm(10,mean=3,sd=2))
X2=2*X1
test2mu(X1,X2,
paired=TRUE,eqlvar=FALSE,unkwnsigmas=TRUE,
sigma1=NULL,sigma2=NULL,alpha=0.05,
sam1col="blue",sam2col="red",thrcol="black")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.