misoN: Multivariable Isotonic Regression for Continuous Data using...

View source: R/fun.R

misoNR Documentation

Multivariable Isotonic Regression for Continuous Data using Inverse Projective Bayes

Description

Estimates the underlying mean response for multivariate features using an inverse projective Bayes approach. The estimator is obtained by inverting the projective Bayes classifier across a grid of thresholds, yielding a monotone nonparametric estimate of the mean response that is nondecreasing in each feature. A Normal-Inverse-Chi-Squared conjugate model is used to compute posterior probabilities at each threshold. The threshold grid is determined automatically from the data range and nt controls the resolution of the grid.

Usage

misoN(X, y, nt = 101, mu0 = 0, sig0 = 100, kap0 = 0.01, nu0 = 0.01)

Arguments

X

a numeric matrix of observed feature combinations, one row per observation, where repeated rows are expected. Each column represents a feature (e.g., a dose component or experimental factor) and each row represents the feature combination observed for one unit.

y

a numeric vector of length nrow(X) containing the continuous outcome for each observation.

nt

a positive integer specifying the number of threshold grid points used to invert the classifier. The grid range is determined automatically from the observed data. Larger values yield finer resolution at the cost of increased computation time. Defaults to 101, which is approximately equivalent to the default incr = 0.01 used in miso.

mu0

a numeric value specifying the prior mean of the response. Defaults to 0.

sig0

a positive numeric value specifying the prior scale parameter, interpreted as the prior standard deviation of the response. Defaults to 100, yielding a diffuse prior.

kap0

a positive numeric value specifying the prior pseudo sample size for the mean. Smaller values yield a more diffuse prior on the mean. Defaults to 0.01.

nu0

a positive numeric value specifying the prior degrees of freedom for the variance. Smaller values yield a more diffuse prior on the variance. Defaults to 0.01.

Details

The prior distribution assumes that the mean response \mu at each feature combination follows a Normal-Inverse-Chi-Squared model. Specifically, the conditional prior on \mu given variance \sigma^2 is \mu | \sigma^2 \sim N(\mu_0, \sigma^2 / \kappa_0), and the marginal prior on \mu is a t-distribution centered at mu0 with nu0 degrees of freedom and scale sig0. The default values kap0 = nu0 = 0.01 approximate a Jeffreys non-informative prior, minimizing the influence of the prior on the posterior especially for feature combinations with few observations (M = 1). A more informative prior can be specified by increasing kap0 and nu0.

Value

A list containing the following components:

alldoses

a numeric matrix of unique feature combinations observed in the training data

M

a numeric vector of observation counts at each feature combination

MY

a numeric vector of sample means of the outcome at each feature combination (NA if M = 0)

VY

a numeric vector of sample variances of the outcome at each feature combination (NA if M <= 1)

thetahat

a numeric vector of estimated mean responses at each unique feature combination, monotone nondecreasing with respect to the partial ordering of the features

nt

an integer giving the number of threshold grid points used

logH

a numeric vector of length nt giving the log posterior gain of the optimal classification at each threshold grid point

References

Cheung YK, Diaz KM. Monotone response surface of multi-factor condition: estimation and Bayes classifiers. J R Stat Soc Series B Stat Methodol. 2023 Apr;85(2):497-522. doi: 10.1093/jrsssb/qkad014. Epub 2023 Mar 22. PMID: 38464683; PMCID: PMC10919322.

Examples

A <- as.matrix(expand.grid(rep(list(0:1), 6)))
set.seed(2025)
X <- A[sample(nrow(A), size=500, replace=TRUE),]
y <- rowSums(X) + rnorm(500)
misoN(X, y)

McMiso documentation built on April 4, 2026, 1:07 a.m.

Related to misoN in McMiso...