Learn R Programming

isodistrreg (version 0.6.0)

isotonic_regression_impl: Compute the isotonic regression for the mean for totally ordered covariates.

Description

Internal method that is used by R code to pass into Rust code.

Usage

isotonic_regression_impl(y, X = NULL, weights = NULL, decreasing = FALSE)

Value

Numeric vector of isotonic fitted means.

Arguments

y

Double vector of response values.

X

Double vector of covariate values, or NULL if responses are pre-sorted.

weights

Double vector of non-negative weights, or NULL for equal weights.

decreasing

Bool indicating direction (default FALSE is increasing, TRUE is decreasing).

Details

Internal wrapper; user-facing input validation happens in the R function `isotonic_regression()` (R/modeling.R). The asserts here are backstops with clear messages for anyone calling the wrapper directly.