Varying-Coefficient Mixture-of-Experts Models

Fits Gaussian, Binomial, and Negative-Binomial varying-coefficient mixture-of-experts models with local-linear estimation, explicit label alignment, bandwidth selection, diagnostics, bootstrap inference, confidence bands, coefficient-specific generalized likelihood-ratio tests (GLRT) with analytic or bootstrap calibration, and local-grid or joint-path expectation-maximization fitting engines. For clustered observations it provides cluster-robust (CR2) intervals with wild cluster bootstrap bands and path tests, and a cluster-robust screen of candidate covariates for expert effects.


VCMoE

R CRAN status License: MIT Documentation arXiv Issues welcome

Varying-Coefficient Mixture-of-Experts Models

VCMoE is an R package for fitting varying-coefficient mixture-of-experts models. It supports Gaussian, Binomial, and Negative-Binomial responses, with local-linear estimation, component label alignment, bandwidth selection, diagnostics, confidence bands, bootstrap inference, and generalized likelihood-ratio tests.

The package is intended for problems where component-specific response relationships and component probabilities change along a continuous coordinate, such as time, pseudotime, dose, or spatial location.

Installation

Install the released version from CRAN:

install.packages("VCMoE")

Install the development version from GitHub:

install.packages("remotes")
remotes::install_github("qc-zhao/VCMoE")

Load the package:

library(VCMoE)

Need help with installation or usage? Please open a GitHub issue:

https://github.com/qc-zhao/VCMoE/issues

Quick Start

set.seed(1)

sim <- simulate_vcmoe_gaussian(
  n = 300,
  k = 2,
  scenario = "well_separated"
)

fit <- vcmoe_fit(
  y ~ z1 | x1,
  data = sim$data,
  u = sim$data$u,
  k = 2,
  family = "gaussian",
  bandwidth = 0.25
)

coef(fit, "expert")
predict(fit, type = "posterior")
plot_coefficients(fit)

Documentation

The full documentation website includes Gaussian, Binomial, and Negative-Binomial tutorials plus the function reference:

https://qc-zhao.github.io/VCMoE/

Useful links:

Citation

Please cite:

Zhao Q, Greenwood CMT, Zhang Q. Varying-Coefficient Mixture of Experts Model. arXiv:2601.01699. https://arxiv.org/abs/2601.01699

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("VCMoE")

0.3.0 by Qicheng Zhao, 7 days ago


https://qc-zhao.github.io/VCMoE/, https://github.com/qc-zhao/VCMoE


Report a bug at https://github.com/qc-zhao/VCMoE/issues


Browse source code at https://github.com/cran/VCMoE


Authors: Qicheng Zhao [aut, cre] , Celia M.T. Greenwood [aut] , Qihuang Zhang [aut]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports ggplot2, stats, utils

Suggests knitr, MASS, rmarkdown, sandwich, testthat


See at CRAN