| senser | R Documentation |
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.
senser(
data,
proxy,
target,
lang = c("english", "indonesia"),
stagnation_cut = 0.01,
cv_cut = 0.02,
ceiling_cut = 0.95
)
data |
A data.frame containing the target construct and proxy variables. |
proxy |
Character vector specifying one or more proxy variable names contained
in |
target |
Character string specifying the target construct variable name contained
in |
lang |
Language for status labels and interpretation text.
Must be either |
stagnation_cut |
Threshold used to detect stagnation (very small average absolute change).
Default is |
cv_cut |
Threshold for the coefficient of variation (CV).
Default is |
ceiling_cut |
Threshold used to detect ceiling effects.
Default is |
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
A data.frame with one row per proxy variable containing:
Target construct name.
Proxy variable name.
Spearman correlation (absolute).
R-squared value.
Elasticity index.
Coefficient of variation.
Average absolute change.
Mean-to-maximum ratio.
Coefficient stability index.
Median diagnostic score.
Qualitative proxy category.
Plain-language interpretation.
Joko Nursiyono
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.
lm, cor, median
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"
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.