Learn R Programming

pECV (version 1.0.1)

estimate_C_binary: Estimate constraint constant C for binary data

Description

Data-driven estimation of the constraint constant C for binary data using cross-window smoothing and empirical logit transformation.

Usage

estimate_C_binary(X, qmax = 8, safety = 1.5, eps = 1e-12, radius = 1)

Value

A list containing:

radius

Cross-window radius used

qmax

Truncation rank used

safety

Safety parameter applied

C0

Original maximum row norm

C_est

Final conservative estimate of C

a_norms

Row norms of factor matrix A

b_norms

Row norms of factor matrix B

Mhat

Logit-transformed matrix

P_smooth

Smoothed probability matrix

N_counts

Count of values in each smoothing window

Arguments

X

n x p binary data matrix (0/1 values)

qmax

Rank for truncated SVD (default 8)

safety

Safety parameter for conservative estimation (default 1.5)

eps

Small constant to avoid logit divergence when p=0 or p=1 (default 1e-12)

radius

Radius for cross-window smoothing (default 1)

Details

The function performs the following steps: 1. Applies cross-window smoothing to estimate probabilities 2. Performs empirical logit transformation with smoothing 3. Computes truncated SVD of the transformed matrix 4. Constructs matrices A and B and calculates row norms 5. Estimates C as the maximum norm times safety parameter

The cross-window smoothing helps stabilize probability estimates, especially for sparse binary data.