Type: Package
Title: Neutrosophic Survey Data Analysis
Version: 0.1.0
Maintainer: Pankaj Das <pankaj.iasri@gmail.com>
Description: Apply neutrosophic regression type estimator and performs neutrosophic interval analysis including metric calculations for survey data.
License: GPL-3
Encoding: UTF-8
Depends: R (≥ 3.5.0)
Imports: moments, stats
Suggests: knitr, rmarkdown, testthat (≥ 3.0.0)
VignetteBuilder: knitr
RoxygenNote: 7.3.2
NeedsCompilation: no
Packaged: 2025-06-19 09:06:14 UTC; Pankaj
Author: Neha Purwar [aut], Kaustav Aditya [aut], Pankaj Das ORCID iD [aut, cre], Bharti Bharti [aut]
Repository: CRAN
Date/Publication: 2025-06-23 11:00:02 UTC

Calculate All MSE Neutrosophic

Description

Computes various Mean Squared Error (MSE) estimates for neutrosophic interval data using different adjustment methods.

Usage

calculate_all_mse_neutrosophic(
  theta_L,
  theta_U,
  Y_L,
  Y_U,
  X_L,
  X_U,
  Cx_L,
  Cx_U,
  Cy_L,
  Cy_U,
  rho_L,
  rho_U,
  B_L,
  B_U
)

Arguments

theta_L

Lower theta value (1/n_L - 1/N_L)

theta_U

Upper theta value (1/n_U - 1/N_U)

Y_L

Lower study mean

Y_U

Upper study mean

X_L

Lower auxiliary mean

X_U

Upper auxiliary mean

Cx_L

Lower auxiliary CV

Cx_U

Upper auxiliary CV

Cy_L

Lower study CV

Cy_U

Upper study CV

rho_L

Lower correlation

rho_U

Upper correlation

B_L

Lower kurtosis

B_U

Upper kurtosis

Value

A list containing five types of MSE estimates:

Author(s)

Neha Purwar, Kaustav Aditya, Pankaj Das and Bharti

Examples

# First compute metrics from data
data(japan_neutro)
metrics <- compute_all_metrics(japan_neutro)

# Define population parameters (non-interactive example)
inputs <- list(theta_L = 0.01, theta_U = 0.02)

# Calculate all MSE types
mse_results <- calculate_all_mse_neutrosophic(
  inputs$theta_L, inputs$theta_U,
  metrics$mean_interval_Y[1], metrics$mean_interval_Y[2],
  metrics$mean_interval_X[1], metrics$mean_interval_X[2],
  metrics$cv_interval_X[1], metrics$cv_interval_X[2],
  metrics$cv_interval_Y[1], metrics$cv_interval_Y[2],
  metrics$correlation_results[1], metrics$correlation_results[2],
  metrics$kurtosis_interval_X[1], metrics$kurtosis_interval_X[2]
)

# Print results
print(mse_results)

Calculate Percentage Relative Efficiency (PRE)

Description

Computes the Percentage Relative Efficiency (PRE) of different MSE estimators relative to the regression estimator MSE. PRE values greater than 100 indicate better efficiency than the regression estimator, while values less than 100 indicate worse efficiency.

Usage

calculate_pre(result_all_mse)

Arguments

result_all_mse

A list containing MSE results from calculate_all_mse_neutrosophic

Value

A list containing PRE values for each estimator type:

See Also

calculate_all_mse_neutrosophic for generating the input MSE values

Examples

data(japan_neutro)
metrics <- compute_all_metrics(japan_neutro)
mse_results <- calculate_all_mse_neutrosophic(
  0.01, 0.02,
  metrics$mean_interval_Y[1], metrics$mean_interval_Y[2],
  metrics$mean_interval_X[1], metrics$mean_interval_X[2],
  metrics$cv_interval_X[1], metrics$cv_interval_X[2],
  metrics$cv_interval_Y[1], metrics$cv_interval_Y[2],
  metrics$correlation_results[1], metrics$correlation_results[2],
  metrics$kurtosis_interval_X[1], metrics$kurtosis_interval_X[2]
)
pre_results <- calculate_pre(mse_results)
print(pre_results)

Compute Neutrosophic Interval Metrics

Description

Calculates various metrics for neutrosophic interval data including means, standard deviations, CVs, kurtosis, and correlations between interval-valued variables.

Usage

compute_all_metrics(data)

Arguments

data

A data frame containing columns 'Auxili_min', 'Auxili_max', 'Study_min', and 'Study_max'

Value

A list containing all calculated metrics with components:

Author(s)

Neha Purwar, Kaustav Aditya, Pankaj Das and Bharti

Examples

data(japan_neutro)
metrics <- compute_all_metrics(japan_neutro)

# View mean intervals
cat("Auxiliary Mean Interval:", metrics$mean_interval_X, "\n")
cat("Study Mean Interval:", metrics$mean_interval_Y, "\n")

# View correlation results
cat("Correlation between intervals (rho_L, rho_U):",
    metrics$correlation_results, "\n")

Format MSE Results for Neutrosophic Survey Data Analysis

Description

Formats the output of calculate_all_mse_neutrosophic into a human-readable string that clearly displays all five types of MSE estimates with their interval values.

Usage

format_mse_results(mse_results)

Arguments

mse_results

A list containing MSE results from calculate_all_mse_neutrosophic

Details

The function takes the MSE results list and formats it to show:

Value

A formatted character string ready for printing, showing all MSE types with their lower and upper bounds

See Also

calculate_all_mse_neutrosophic for generating the input for this function

Examples

# First calculate MSE results
data(japan_neutro)
metrics <- compute_all_metrics(japan_neutro)
mse <- calculate_all_mse_neutrosophic(
  0.01, 0.02,
  metrics$mean_interval_Y[1], metrics$mean_interval_Y[2],
  metrics$mean_interval_X[1], metrics$mean_interval_X[2],
  metrics$cv_interval_X[1], metrics$cv_interval_X[2],
  metrics$cv_interval_Y[1], metrics$cv_interval_Y[2],
  metrics$correlation_results[1], metrics$correlation_results[2],
  metrics$kurtosis_interval_X[1], metrics$kurtosis_interval_X[2]
)

# Format and print results
cat(format_mse_results(mse))

Get User Inputs for Population and Sample Sizes

Description

Interactively prompts user for population and sample sizes and calculates theta values (1/n - 1/N) used in MSE calculations.

Usage

get_user_inputs()

Value

A list containing:

Author(s)

Neha Purwar, Kaustav Aditya, Pankaj Das and Bharti

Examples


if(interactive()){
# Interactive example (run in console)
inputs <- get_user_inputs()

# The function will prompt:
# Enter value for population size_L: 1000
# Enter value for population size_U: 2000
# Enter value for sample_size_L: 100
# Enter value for sample_size_U: 200
}

Japan Neutrosophic Interval Dataset

Description

A dataset containing interval-valued measurements from Japan, suitable for neutrosophic statistical analysis. The data includes both auxiliary and study variables with their minimum and maximum bounds.

Usage

data(japan_neutro)

Format

A data frame with 31 observations and 4 variables:

Auxili_min

Numeric vector representing the lower bounds of the auxiliary variable

Auxili_max

Numeric vector representing the upper bounds of the auxiliary variable

Country

Non-numeric vector representing country names

Sex

Non-numeric vector representing sex of particapant i.e. male or female

Study_min

Numeric vector representing the lower bounds of the study variable

Study_max

Numeric vector representing the upper bounds of the study variable

Year

Numeric vector representing year on which the data is collected

Examples

# Load the dataset
data(japan_neutro)

# View the first few rows
head(japan_neutro)

# Calculate basic metrics
metrics <- compute_all_metrics(japan_neutro)
print(metrics$mean_interval_X)  # Mean of auxiliary variable
print(metrics$mean_interval_Y)  # Mean of study variable