rss.z.test {generalRSS} | R Documentation |
RSS z-test for one-sample and two-sample problems
Description
The rss.z.test function performs one- and two-sample z-tests on ranked set sample data using normal approximation, with options for specifying the confidence level, alternative hypothesis, and hypothesized mean or mean difference.
Usage
rss.z.test(
data1,
data2 = NULL,
alpha = 0.05,
alternative = "two.sided",
mu0 = 0
)
Arguments
data1 |
A numeric data frame of ranked set samples with columns |
data2 |
An optional numeric data frame of ranked set samples with columns |
alpha |
A numeric value specifying the confidence level for the interval. |
alternative |
A character string specifying the alternative hypothesis. Must be one of "two.sided" (default), "greater", or "less". |
mu0 |
A numeric value indicating the hypothesized value of the mean (for a one-sample problem) or the difference in means (for a two-sample problem). |
Details
This function performs a z-test on ranked set sample data for both one-sample and two-sample mean comparison problems, using normal approximation. For a one-sample test, only data1
is needed, provided as a data frame with columns rank
and y
. For a two-sample test, both data1
and data2
must be supplied, each as data frames with rank
and y
columns. The function computes the test statistic, confidence interval, and p-value based on the provided RSS data and specified parameters.
Value
RSS_mean |
The RSS mean estimate for a one-sample problem or a vector of RSS mean estimates for each group in a two-sample problem. |
CI |
The confidence interval for the population mean for a one-sample problem or for the mean difference in a two-sample problem. |
z |
The z-statistic for the test. |
p.value |
The p-value for the test. |
References
Chen, Z., Bai Z., Sinha B. K. (2003). Ranked Set Sampling: Theory and Application. New York: Springer.
S. Ahn, J. Lim, and X. Wang. (2014) The student’s t approximation to distributions of pivotal statistics from ranked set samples. Journal of the Korean Statistical Society, 43, 643–652.
S. Ahn, X. Wang, C. Moon, and J. Lim. (2024) New scheme of empirical likelihood method for ranked set sampling: Applications to two one sample problems. International Statistical Review.
See Also
rss.simulation
: used for simulating Ranked Set Samples (RSS), which can serve as input.
rss.sampling
: used for sampling Ranked Set Samples (RSS) from a population data set, providing input data.
Examples
## Balanced RSS with a set size 3 and equal sample sizes of 6 for each stratum,
## using imperfect ranking from a normal distribution with a mean of 0.
rss.data1=rss.simulation(H=3,nsamp=c(6,6,6),dist="normal", rho=0.8,delta=0)
## one-sample z-test
rss.z.test(data1=rss.data1, data2=NULL, alpha=0.05,
alternative="two.sided", mu0=0)
## Unbalanced RSS with a set size 3 and different sample sizes of 6, 10, and 8 for each stratum,
## using imperfect ranking from a normal distribution with a mean of 0.
rss.data2<-rss.simulation(H=3,nsamp=c(6,8,10),dist="normal", rho=0.8,delta=0)
## two-sample z-test
rss.z.test(data1=rss.data1, data2=rss.data2, alpha=0.05,
alternative="two.sided", mu0=0)