weight_matrix: Calculate weighted matrix

weight_matrixR Documentation

Calculate weighted matrix

Description

Calculate weighted matrix

Usage

weight_matrix(X, normalize_W_weights = TRUE)

Arguments

X

data.table. Output from create_coalition_table().

normalize_W_weights

Logical. Whether to normalize the weights for the coalitions to sum to 1 for increased numerical stability before solving the WLS (weighted least squares). Applies to all coalitions except coalition 1 and 2^m.

Value

Numeric matrix. See weight_matrix_cpp() for more information.

Author(s)

Nikolai Sellereite, Martin Jullum


NorskRegnesentral/shapr documentation built on Feb. 11, 2025, 6:41 a.m.