| Title: | Outlier-Robust Ratio-cum-Product Estimators of Finite Population Mean |
|---|---|
| Description: | Implements robust ratio-cum-product estimators using auxiliary medians for estimating the population mean under simple random sampling without replacement (SRSWOR). Provides analytical optimal tuning parameters, bias, Mean Squared Error (MSE), and Percent Relative Efficiency (PRE) evaluations. |
| Authors: | Okechukwu J. Obulezi [aut, cre] (ORCID: <https://orcid.org/0000-0002-7753-1868>, Affiliation: Department of Statistics, Faculty of Physical Sciences, Nnamdi Azikiwe University, Awka, Nigeria) |
| Maintainer: | Okechukwu J. Obulezi <[email protected]> |
| License: | MIT + file LICENSE |
| Version: | 0.1.0 |
| Built: | 2026-10-09 11:28:46 UTC |
| Source: | https://github.com/cran/robustrcp |
Computes baseline estimators and evaluates Percent Relative Efficiency (PRE).
compare_estimators(y, x1, x2, M1, M2, N)compare_estimators(y, x1, x2, M1, M2, N)
y |
Vector of study variable. |
x1 |
Vector of first auxiliary variable. |
x2 |
Vector of second auxiliary variable. |
M1 |
Known population median of x1. |
M2 |
Known population median of x2. |
N |
Finite population size. |
A data frame summarizing estimates, Bias, MSE, and PRE.
A simulated dataset containing crop yield, area, and cost data with introduced outliers.
data(crop_data)data(crop_data)
A data frame with 200 rows and 3 variables:
Primary study variable y (Crop yield with outliers).
Auxiliary variable x1 (Positively correlated area).
Auxiliary variable x2 (Negatively correlated cost).
Evaluates the outlier-robust ratio-cum-product estimator of the finite population mean using medians of two auxiliary variables under Simple Random Sampling Without Replacement (SRSWOR).
robust_rcp(y, x1, x2, M1, M2, N, alpha1 = NULL, alpha2 = NULL)robust_rcp(y, x1, x2, M1, M2, N, alpha1 = NULL, alpha2 = NULL)
y |
Vector of sample observations for the primary study variable. |
x1 |
Vector of sample observations for the first auxiliary variable (positively correlated with y). |
x2 |
Vector of sample observations for the second auxiliary variable (negatively correlated with y). |
M1 |
Known population median of x1. |
M2 |
Known population median of x2. |
N |
Total finite population size. |
alpha1 |
Optional numeric tuning parameter for x1. Computed analytically if NULL. |
alpha2 |
Optional numeric tuning parameter for x2. Computed analytically if NULL. |
An object of class robustrcp containing:
estimate |
The estimated population mean. |
alpha1_opt |
Optimal or specified scaling parameter for x1. |
alpha2_opt |
Optimal or specified scaling parameter for x2. |
bias |
First-order approximation of the Bias. |
mse |
First-order approximation of the Mean Squared Error (MSE). |
sample_size |
Sample size n. |
population_size |
Population size N. |
Okechukwu J. Obulezi [email protected]
set.seed(123) N <- 1000 n <- 100 x1 <- rlnorm(n, meanlog = 2, sdlog = 0.8) x2 <- rlnorm(n, meanlog = 3, sdlog = 1.0) y <- 2*x1 - 0.5*x2 + rnorm(n, mean = 10, sd = 2) robust_rcp(y = y, x1 = x1, x2 = x2, M1 = median(x1), M2 = median(x2), N = N)set.seed(123) N <- 1000 n <- 100 x1 <- rlnorm(n, meanlog = 2, sdlog = 0.8) x2 <- rlnorm(n, meanlog = 3, sdlog = 1.0) y <- 2*x1 - 0.5*x2 + rnorm(n, mean = 10, sd = 2) robust_rcp(y = y, x1 = x1, x2 = x2, M1 = median(x1), M2 = median(x2), N = N)