senser: Proxy Indicator Diagnostic Tool

View source: R/senser.R

senserR Documentation

Proxy Indicator Diagnostic Tool

Description

senser() is a statistical diagnostic function designed to evaluate whether one or more proxy indicators are suitable representations of an underlying construct that cannot be directly observed or measured.

The function assesses each proxy based on multiple statistical dimensions: monotonicity, information content, stability, distributional alignment, bias risk, and dynamic range (sensitivity).

The output is returned as a structured data.frame containing quantitative scores and qualitative classifications suitable for applied research and policy diagnostics.

Usage

senser(
  data,
  proxy,
  target,
  lang = c("english", "indonesia"),
  stagnation_cut = 0.01,
  cv_cut = 0.02,
  ceiling_cut = 0.95
)

Arguments

data

A data.frame containing the target construct and proxy variables.

proxy

Character vector specifying one or more proxy variable names contained in data.

target

Character string specifying the target construct variable name contained in data.

lang

Language for status labels and interpretation text. Must be either "english" or "indonesia".

stagnation_cut

Threshold used to detect stagnation (very small average absolute change). Default is 0.01.

cv_cut

Threshold for the coefficient of variation (CV). Default is 0.02.

ceiling_cut

Threshold used to detect ceiling effects. Default is 0.95.

Details

The diagnostic score for each proxy is computed using six normalized components:

  • monotonicity: Spearman rank correlation.

  • information_content: R-squared from linear regression.

  • elasticity_score: Responsiveness index.

  • variability_score: Based on coefficient of variation.

  • stagnation_score: Penalizes near-flat dynamics.

  • ceiling_score: Penalizes ceiling effects.

  • stability_score: Coefficient stability across subsamples.

The final proxy score is computed as the median of all components.

Classification categories:

  • Score >= 0.70: Suitable proxy

  • 0.40 <= Score < 0.70: Conditionally suitable

  • Score < 0.40: Not suitable proxy

Value

A data.frame with one row per proxy variable containing:

target

Target construct name.

proxy

Proxy variable name.

monotonicity

Spearman correlation (absolute).

information_content

R-squared value.

elasticity

Elasticity index.

cv

Coefficient of variation.

avg_change

Average absolute change.

ceiling_ratio

Mean-to-maximum ratio.

stability_score

Coefficient stability index.

final_score

Median diagnostic score.

classification

Qualitative proxy category.

interpretation

Plain-language interpretation.

Author(s)

Joko Nursiyono

References

Spearman, C. (1904). The proof and measurement of association between two things. American Journal of Psychology, 15(1), 72–101.

Chow, G. C. (1960). Tests of equality between sets of coefficients in two linear regressions. Econometrica.

OECD (2008). Handbook on Constructing Composite Indicators: Methodology and User Guide.

See Also

lm, cor, median

Examples

set.seed(123)
df <- data.frame(
  gdp = rnorm(100, 10, 2),
  ntl = rnorm(100, 50, 10),
  road_density = rnorm(100, 3, 0.5)
)

senser(
  data = df,
  proxy = c("ntl", "road_density"),
  target = "gdp",
  lang = "english"
)


senseR documentation built on Feb. 25, 2026, 5:08 p.m.