Title: | Testing the Equality of Two Means Using RSS and MRSS |
Version: | 1.0 |
Description: | Testing the equality of two means using Ranked Set Sampling and Median Ranked Set Sampling are provided under normal distribution. Data generation functions are also given RSS and MRSS. Also, data generation functions are given under imperfect ranking data for Ranked Set Sampling and Median Ranked Set Sampling. Ozdemir Y.A., Ebegil M., & Gokpinar F. (2019), <doi:10.1007/s40995-018-0558-0> Ozdemir Y.A., Ebegil M., & Gokpinar F. (2017), <doi:10.1080/03610918.2016.1263736>. |
License: | GPL-2 |
Depends: | R (≥ 3.5.0), huxtable (≥ 5.4.0) |
Imports: | stats, graphics |
Encoding: | UTF-8 |
LazyData: | True |
RoxygenNote: | 7.2.3 |
NeedsCompilation: | no |
Packaged: | 2023-02-23 11:59:05 UTC; macbook |
Author: | Fikri Gökpınar |
Maintainer: | Fikri Gökpınar <fikri@gazi.edu.tr> |
Repository: | CRAN |
Date/Publication: | 2023-02-24 10:30:11 UTC |
CVT Data
Description
CVT Data
Usage
data(CVT)
Format
A dataframe with 167 rows 6 variables
- r1
otolith length
- otolith.width
otolith width
- otolith.weight
otolith weight
- fish.length
fish lenght
- fish.weight
fish weight
- age
age
- sex
sex
Examples
data("CVT")
Median Ranked Set Sampling Data Generation
Description
This function generates random samples from normal population using Median ranked set sampling with
mean \mu
and standard deviation \sigma
using cycle size r and set size m.
Usage
datagen_MRSS(mu, s, m, r)
Arguments
mu |
: Normal population mean |
s |
: Normal population standard deviation |
m |
: Set size |
r |
: Cycle size |
Value
A sample matrix with size rxm generated from normal distribution using Median ranked set sampling. Each row indicates a cycle.
References
MacEachern, S. N., Öztürk, Ö., Wolfe, A. D. (2002). A new ranked set sample estimator of variance. Journal of the Royal Statistical Society: Series B., 64, Part 2 177–188.
Özturk, Ö., Balakrishnan N (2009) Exact two-sample nonparametric test for quantile difference between two populations based on ranked set samples. Ann Inst Stat Math 61(1):235–249
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2017). A test statistic based on ranked set sampling for two normal means. Communications in Statistics-Simulation and Computation, 46(10), 8077-8085.
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2019). A test statistic for two normal means with median ranked set sampling. Iranian Journal of Science and Technology, Transactions A: Science, 43(3), 1109-1126.
See Also
datagen_RSS
, teststat_RSS
teststat_MRSS
Examples
datagen_MRSS(0,1,2,3)
Ranked Set Sampling Data Generation
Description
This function generates random samples from normal population using ranked set sampling with
mean \mu
and standard deviation \sigma
using cycle size r and set size m.
Usage
datagen_RSS(mu, s, m, r)
Arguments
mu |
: Normal population mean |
s |
: Normal population standard deviation |
m |
: Set size |
r |
: Cycle size |
Value
A sample matrix with size rxm generated from normal distribution using ranked set sampling. Each row indicates a cycle.
References
MacEachern, S. N., Öztürk, Ö., Wolfe, A. D. (2002). A new ranked set sample estimator of variance. Journal of the Royal Statistical Society: Series B., 64, Part 2 177–188.
Özturk, Ö., Balakrishnan N (2009) Exact two-sample nonparametric test for quantile difference between two populations based on ranked set samples. Ann Inst Stat Math 61(1):235–249
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2017). A test statistic based on ranked set sampling for two normal means. Communications in Statistics-Simulation and Computation, 46(10), 8077-8085.
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2019). A test statistic for two normal means with median ranked set sampling. Iranian Journal of Science and Technology, Transactions A: Science, 43(3), 1109-1126.
See Also
datagen_MRSS
, teststat_RSS
teststat_MRSS
Examples
datagen_RSS(0,1,2,3)
Imperfect Median Ranked Set Sampling Data Generation from Finite Population
Description
This function chooses Median Ranked Set samples from specific finite population using auxiliary variable with cycle sizes r1 and r2 and set sizes m1 and m2.
Usage
imperfectMRSS(df, cat, catname, aux, var, r1, r2, m1, m2)
Arguments
df |
: dataframe of the finite population |
cat |
: the indicator variable that shows the group of units |
catname |
: the group names |
aux |
: auxilary variable |
var |
: variable of interest |
r1 |
: Cycle size of first group |
r2 |
: Cycle size of second group |
m1 |
: Set size of first group |
m2 |
: Set size of second group |
Value
two median ranked set sample matrix with sizes r1xm1 and r2xm2 from finite population. Each row indicates a cycle.
References
MacEachern, S. N., Öztürk, Ö., Wolfe, A. D. (2002). A new ranked set sample estimator of variance. Journal of the Royal Statistical Society: Series B., 64, Part 2 177–188.
Özturk, Ö., Balakrishnan N (2009) Exact two-sample nonparametric test for quantile difference between two populations based on ranked set samples. Ann Inst Stat Math 61(1):235–249
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2017). A test statistic based on ranked set sampling for two normal means. Communications in Statistics-Simulation and Computation, 46(10), 8077-8085.
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2019). A test statistic for two normal means with median ranked set sampling. Iranian Journal of Science and Technology, Transactions A: Science, 43(3), 1109-1126.
See Also
datagen_RSS
, teststat_RSS
teststat_MRSS
,imperfectRSS
Examples
data(otolith)
imperfectMRSS(otolith,"sex",c("F","M"),"fish.length","age",3,3,4,3)
Imperfect Ranked Set Sampling Data Generation from Finite Population
Description
This function chooses Ranked Set samples from specific finite population using auxiliary variable with cycle sizes r1 and r2 and set sizes m1 and m2.
Usage
imperfectRSS(df, cat, catname, aux, var, r1, r2, m1, m2)
Arguments
df |
: dataframe of the finite population |
cat |
: the indicator variable that shows the group of units |
catname |
: the group names |
aux |
: auxilary variable |
var |
: variable of interest |
r1 |
: Cycle size of first group |
r2 |
: Cycle size of second group |
m1 |
: Set size of first group |
m2 |
: Set size of second group |
Value
two ranked set sample matrix with sizes r1xm1 and r2xm2 from finite population. Each row indicates a cycle.
References
MacEachern, S. N., Öztürk, Ö., Wolfe, A. D. (2002). A new ranked set sample estimator of variance. Journal of the Royal Statistical Society: Series B., 64, Part 2 177–188.
Özturk, Ö., Balakrishnan N (2009) Exact two-sample nonparametric test for quantile difference between two populations based on ranked set samples. Ann Inst Stat Math 61(1):235–249
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2017). A test statistic based on ranked set sampling for two normal means. Communications in Statistics-Simulation and Computation, 46(10), 8077-8085.
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2019). A test statistic for two normal means with median ranked set sampling. Iranian Journal of Science and Technology, Transactions A: Science, 43(3), 1109-1126.
See Also
datagen_RSS
, teststat_RSS
teststat_MRSS
, imperfectMRSS
Examples
data(otolith)
imperfectRSS(otolith,"sex",c("F","M"),"fish.length","age",3,3,4,3)
Otolith Data
Description
The data related to otolith bone of fishes was collected from Elazığ Keban Dam Lake (November 2011-December 2012), which was a part of the data by given Doğan and Şen(2017). The data containing otolith length, otolith width, otolith weight, fish length, fish width, age and sex.
Usage
data(otolith)
Format
A dataframe with 167 rows 6 variables
- otolith.length
otolith length
- otolith.width
otolith width
- otolith.weight
otolith weight
- fish.length
fish lenght
- fish.weight
fish weight
- age
age
- sex
sex
Source
Doğan Y. Şen D., Otolith Biometry-Fish Lenth Relationship in Capoeta trutta Inhabiting Keban Dam Lake
Examples
data("otolith")
Median Ranked Set Sampling Test
Description
This function tests for the difference of two population means using ranked set sampling given in Özdemir, Ebegil and Gökpınar (2019).
Usage
teststat_MRSS(
x1,
x2,
alpha = 0.05,
alternative = "two-tailed",
tn = 2000,
table = TRUE
)
Arguments
x1 |
A (non-empty) numeric matrix (m1xr1) of median ranked set sample for Group 1 with set size m1 and cycle size r1. |
x2 |
A (non-empty) numeric matrix (m2xr2) of median ranked set sample for Group 2 with set size m2 and cycle size r2. |
alpha |
A scalar value of the significance level for hypothesis testing used in the table. Default is 0.05. |
alternative |
A character string specifying the alternative hypothesis, must be one of "two-sided", "right" or "left". Can be abbreviated. Default is "two-sided". |
tn |
A scalar value of the number of repetitions of Monte Carlo simulation. Default is 2000. |
table |
A logical value that shows table gives the results of the hypothesis test are printed out. Default is TRUE. |
Value
If table is TRUE the hypothesis test results table includes sample sizes, test statistics, p values and test results are printed out.
References
MacEachern, S. N., Öztürk, Ö., Wolfe, A. D. (2002). A new ranked set sample estimator of variance. Journal of the Royal Statistical Society: Series B., 64, Part 2 177–188.
Özturk, Ö., Balakrishnan N (2009) Exact two-sample nonparametric test for quantile difference between two populations based on ranked set samples. Ann Inst Stat Math 61(1):235–249
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2017). A test statistic based on ranked set sampling for two normal means. Communications in Statistics-Simulation and Computation, 46(10), 8077-8085.
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2019). A test statistic for two normal means with median ranked set sampling. Iranian Journal of Science and Technology, Transactions A: Science, 43(3), 1109-1126.
See Also
datagen_MRSS
, datagen_RSS
,
teststat_RSS
Examples
x1=matrix(c(1,2.3, 3.4,4.5,5.6,4 ),nrow=3)
x2=matrix(c(2,3.2, 4.2,6.5,4.6,6 ),nrow=3)
teststat_MRSS(x1,x2,tn=1000)
Ranked Set Sampling Test
Description
This function tests for the difference of two population means using ranked set sampling given in Özdemir, Ebegil and Gökpınar (2017).
Usage
teststat_RSS(x1, x2, alpha = 0.05, alternative = "two-tailed", table = TRUE)
Arguments
x1 |
A (non-empty) numeric matrix (m1xr1) of ranked set sample for Group 1 with set size m1 and cycle size r1. |
x2 |
A (non-empty) numeric matrix (m2xr2) of ranked set sample for Group 2 with set size m2 and cycle size r2. |
alpha |
A scalar value of the significance level for hypothesis testing used in the table. Default is 0.05. |
alternative |
A character string specifying the alternative hypothesis, must be one of "two-sided", "right" or "left". Can be abbreviated. Default is "two-sided". |
table |
A logical value that shows table gives the results of the hypothesis test are printed out. Default is TRUE. |
Value
If table is TRUE the hypothesis test results table includes sample sizes, test statistics, critical values and test results are printed out.
References
MacEachern, S. N., Öztürk, Ö., Wolfe, A. D. (2002). A new ranked set sample estimator of variance. Journal of the Royal Statistical Society: Series B., 64, Part 2 177–188.
Özturk, Ö., Balakrishnan N (2009) Exact two-sample nonparametric test for quantile difference between two populations based on ranked set samples. Ann Inst Stat Math 61(1):235–249
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2017). A test statistic based on ranked set sampling for two normal means. Communications in Statistics-Simulation and Computation, 46(10), 8077-8085.
Özdemir, Y. A., Ebegil, M., & Gökpinar, F. (2019). A test statistic for two normal means with median ranked set sampling. Iranian Journal of Science and Technology, Transactions A: Science, 43(3), 1109-1126.
@seealso datagen_MRSS
, datagen_RSS
, teststat_MRSS
Examples
x1=matrix(c(1,2.3, 3.4,4.5,5.6,4 ),nrow=3)
x2=matrix(c(2,3.2, 4.2,6.5,4.6,6 ),nrow=3)
teststat_RSS(x1,x2)