Welcome to ClientVPS Mirrors

Help for package robustrcp

Package {robustrcp}


Type: Package
Title: Outlier-Robust Ratio-cum-Product Estimators of Finite Population Mean
Version: 0.1.0
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.
License: MIT + file LICENSE
Encoding: UTF-8
LazyData: true
Imports: stats
Config/roxygen2/version: 8.1.0
Depends: R (≥ 3.5)
NeedsCompilation: no
Packaged: 2026-08-06 20:15:01 UTC; Dr. O. J. Obulezi
Author: Okechukwu J. Obulezi ORCID iD [aut, cre] (Affiliation: Department of Statistics, Faculty of Physical Sciences, Nnamdi Azikiwe University, Awka, Nigeria)
Maintainer: Okechukwu J. Obulezi <oj.obulezi@unizik.edu.ng>
Repository: CRAN
Date/Publication: 2026-08-20 15:30:02 UTC

Compare Proposed Robust Estimator against Baselines

Description

Computes baseline estimators and evaluates Percent Relative Efficiency (PRE).

Usage

compare_estimators(y, x1, x2, M1, M2, N)

Arguments

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.

Value

A data frame summarizing estimates, Bias, MSE, and PRE.


Contaminated Sample Dataset for Robust Estimation

Description

A simulated dataset containing crop yield, area, and cost data with introduced outliers.

Usage

data(crop_data)

Format

A data frame with 200 rows and 3 variables:

Yield

Primary study variable y (Crop yield with outliers).

Area

Auxiliary variable x1 (Positively correlated area).

Cost

Auxiliary variable x2 (Negatively correlated cost).


Robust Ratio-cum-Product Estimator of Population Mean

Description

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).

Usage

robust_rcp(y, x1, x2, M1, M2, N, alpha1 = NULL, alpha2 = NULL)

Arguments

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.

Value

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.

Author(s)

Okechukwu J. Obulezi oj.obulezi@unizik.edu.ng

Examples

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)

Need a high-speed mirror for your open-source project?
Contact our mirror admin team at info@clientvps.com.

This archive is provided as a free public service to the community.
Proudly supported by infrastructure from VPSPulse , RxServers , BuyNumber , UnitVPS , OffshoreName and secure payment technology by ArionPay.