Learn R Programming

svytest (version 1.1.0)

.perm_eval_one: Internal helper: Evaluate one permutation

Description

Computes the test statistic for a single permutation of weights.

Usage

.perm_eval_one(idx, X, y, w_use, fit_null_beta, fit_null_XtX, stat)

Value

Numeric scalar statistic.

Arguments

idx

Integer index vector for permuted weights.

X

Numeric design matrix.

y

Numeric response vector.

w_use

Normalized weight vector.

fit_null_beta

Baseline coefficient vector.

fit_null_XtX

Baseline precision matrix.

stat

Character string, statistic type.