Learn R Programming

isodistrreg (version 0.6.0)

plain_survival_isotonic_distributional_regression_threshold: Compute an isotonic regression of a probability given by Kaplan-Meier estimators (= one threshold of the plain survival IDR data). Note that this is the non-recursive version that is consistent only under the hazard rate order assumption.

Description

Computes a single threshold of the plain survival isotonic distributional regression (plain survival IDR) under the hazard rate order assumption for totally ordered covariates when some responses are right-censored. Returns the fitted cumulative distribution evaluated at the threshold for each unique covariate.

Usage

plain_survival_isotonic_distributional_regression_threshold(
  threshold,
  X,
  y,
  y_observed,
  weights,
  decreasing = FALSE,
  parallel = FALSE
)

Value

Numeric vector. The i'th entry gives the fitted CDF at covariate i.

Arguments

threshold

Double of the response value at which to compute the IDR solution.

X

Double vector of totally ordered covariates.

y

Double vector of response values.

y_observed

Integer vector: 1 for observed, 0 for censored.

weights

Double vector of non-negative weights. All vectors must have equal length.

decreasing

Bool indicating direction (decreasing is a CIDR threshold).

parallel

Bool indicating whether to use multiple cores.

Examples

Run this code
plain_survival_isotonic_distributional_regression_threshold(3.5, as.double(1:4), c(2, 1, 4, 3),
  as.integer(c(1, 0, 0, 0)), rep(1.0, 4), decreasing = TRUE)

Run the code above in your browser using DataLab