fn.Stage2: Calculate weighted moments and group differences

View source: R/stage-2-functions.R

fn.Stage2R Documentation

Calculate weighted moments and group differences

Description

Calculate weighted moments and group differences

Usage

fn.Stage2(local_data, local_wt.v, Y_hat = NULL, outcome_model = FALSE)

Arguments

local_data

Structured data list containing Y (outcomes), Z (groups), K

local_wt.v

Vector of weights (length N)

Y_hat

Predicted outcomes matrix (N x L) from fn.fit_outcome_model, or NULL.

outcome_model

Logical; if TRUE, uses RF-predicted Y in place of observed Y. Default FALSE.

Value

List with two elements:

  • moments.ar - Array (3 * K * L) of means, SDs, medians

  • moreFeatures.v - Vector (length L) of mean differences


WMAP documentation built on Oct. 6, 2026, 1:07 a.m.