Our recently developed fully robust Bayesian semiparametric mixed-effect model for high-dimensional longitudinal studies with heterogeneous observations can be implemented through this package (Fan et al. (2026)
Robust Bayesian Longitudinal Regularized Semiparametric Mixed Models
Our recently developed fully robust Bayesian semiparametric mixed-effect model for high-dimensional longitudinal studies with heterogeneous observations can be implemented through this package (Fan et al. (2026)). This model can distinguish between time-varying interactions and constant-effect-only cases to avoid model misspecifications. Facilitated by spike-and-slab priors, this model leads to superior performance in estimation, identification and statistical inference. In particular, robust Bayesian inferences in terms of valid Bayesian credible intervals on both parametric and nonparametric effects can be validated on finite samples. The Markov chain Monte Carlo algorithms of the proposed and alternative models are efficiently implemented in 'C++'.
install.packages("devtools")
devtools::install_github("kunfa/Blend")
install.packages("Blend")
library(Blend)
data(dat)
truth = list(gamma0 = function(u) 2+2*sin(2*pi*u),
gamma1 = function(u) 2.5*exp(2.5*u-1),
gamma2 = function(u) 3*u^2-2*u+2,
gamma3 = function(u) -4*u^3+3,
gamma4 = function(u) 3-2*u,
gamma5 = 0.8,
gamma6 = -1.2,
gamma7 = 0.7,
gamma8 = -1.1,
gamma9 = 0,
gamma10 = 0,
gamma11 = 0,
gamma12 = 0,
gamma13 = 0,
gamma14 = 0,
gamma15 = 0)
fit = Blend(y,x,t,J,kn,degree)
## the posterior estimates of coefficients
fit$coefficient
## 95% empirical coverage probabilities
u = as.numeric(fit$basis$u)
rep=1000
CI_RBVSS_SI = matrix(NA, nrow=rep, ncol=length(truth))
colnames(CI_RBVSS_SI) = names(truth)
for(i in 1:rep){
out = unlist(Coverage(fit, truth))
CI_RBVSS_SI[i, ] = out
cat("Replicate = ", i, "\n")
}
## the (varying) intercept has not been regularized
cp_RBVSS_SI = colMeans(CI_RBVSS_SI) # 95% empirical coverage probabilities
## Plot the intercept function and the identified varying effects
plot_Blend(fit,sparse=TRUE)
fit = Blend(y,x,t,J,kn,degree,structural=FALSE)
fit = Blend(y,x,t,J,kn,degree, robust=FALSE)
fit = Blend(y,x,t,J,kn,degree, robust=FALSE, structural=FALSE, sparse = FALSE)
This package provides implementation for methods proposed in