The hardware and bandwidth for this mirror is donated by dogado GmbH, the Webhosting and Full Service-Cloud Provider. Check out our Wordpress Tutorial.
If you wish to report a bug, or if you are interested in having us mirror your free-software or open-source project, please feel free to contact us at mirror[@]dogado.de.

Hypothesis testing for VUS

Duc-Khanh To

2026-11-05

Simulated data

mu_true <- c(0, 0, 0)
sigma_true <- c(1, 1, 1)
n1 <- 30
n2 <- 30
n3 <- 30
X1 <- rnorm(n1, mu_true[1], sigma_true[1])
X2 <- rnorm(n2, mu_true[2], sigma_true[2])
X3 <- rnorm(n3, mu_true[3], sigma_true[3])
out_vus <- vus(x = X1, y = X2, z = X3)
out_vus
#> VUS estimate:
#> [1] 0.1799259
#> 
#> 95% Confidence interval:
#> [1] 0.0998154 0.2848382
#> 
#> p-value (greater): 0.3883414
out_vus$ll.value/mean(out_vus$r.bts)
#> [1] 0.08598193
out_vus$ll.value * out_vus$r.adj
#> [1] 0.08045427

Monte Carlo simulation

Both bootstrap calibrations below use the signed square root of the adjusted EL statistic to test \(H_0: \mathrm{VUS} = 1/6\) against \(H_1: \mathrm{VUS} > 1/6\). Run the following simulation chunks interactively to reproduce the 5,000 replicates per interface.

Default method

out_vus_MC <- lapply(1:5000, FUN = function(i, n1, n2, n3, mu, sigma){
  x1 <- rnorm(n1, mu[1], sigma[1])
  x2 <- rnorm(n2, mu[2], sigma[2])
  x3 <- rnorm(n3, mu[3], sigma[3])
  out_vus_temp <- vus(x = x1, y = x2, z = x3, seed = NULL)
  r_mean <- 1/mean(out_vus_temp$r.bts)
  ll_val_mean <- r_mean * out_vus_temp$ll.value
  ll_val_med <- out_vus_temp$ll.value * out_vus_temp$r.adj
  signed_root_mean <- sign(out_vus_temp$estimate - 1/6) * sqrt(ll_val_mean)
  p_val_mean <- pnorm(signed_root_mean, lower.tail = FALSE)
  p_val_med <- out_vus_temp$p.value
  return(list(ll_val_mean = ll_val_mean, ll_val_med = ll_val_med, 
              p_val_mean = p_val_mean, p_val_med = p_val_med))
}, n1 = 30, n2 = 30, n3 = 30, mu = mu_true, sigma = sigma_true)
p_val_mean_MC <- sapply(1:5000, function(i) out_vus_MC[[i]]$p_val_mean)
hist(p_val_mean_MC)
p_val_med_MC <- sapply(1:5000, function(i) out_vus_MC[[i]]$p_val_med)
hist(p_val_med_MC)
mean(p_val_mean_MC <= 0.05)
mean(p_val_med_MC <= 0.05)

Formula method

out_vus_form_MC <- lapply(1:5000, FUN = function(i, n1, n2, n3, mu, sigma){
  x1 <- rnorm(n1, mu[1], sigma[1])
  x2 <- rnorm(n2, mu[2], sigma[2])
  x3 <- rnorm(n3, mu[3], sigma[3])
  data_test <- data.frame(biom = c(x1, x2, x3), 
                          diag = rep(c("1", "2", "3"), c(n1, n2, n3)))
  out_vus_temp <- vus(formula = biom ~ diag, data = data_test, seed = i)
  r_mean <- 1/mean(out_vus_temp$r.bts)
  ll_val_mean <- r_mean * out_vus_temp$ll.value
  ll_val_med <- out_vus_temp$ll.value * out_vus_temp$r.adj
  signed_root_mean <- sign(out_vus_temp$estimate - 1/6) * sqrt(ll_val_mean)
  p_val_mean <- pnorm(signed_root_mean, lower.tail = FALSE)
  p_val_med <- out_vus_temp$p.value
  return(list(ll_val_mean = ll_val_mean, ll_val_med = ll_val_med, 
              p_val_mean = p_val_mean, p_val_med = p_val_med))
}, n1 = 30, n2 = 30, n3 = 30, mu = mu_true, sigma = sigma_true)
p_val_mean_form_MC <- sapply(1:5000, function(i) out_vus_form_MC[[i]]$p_val_mean)
hist(p_val_mean_form_MC)
sapply(c(0.1, 0.05, 0.01), FUN = function(x) mean(p_val_mean_form_MC <= x))
p_val_med_form_MC <- sapply(1:5000, function(i) out_vus_form_MC[[i]]$p_val_med)
hist(p_val_med_form_MC)
sapply(c(0.1, 0.05, 0.01), FUN = function(x) mean(p_val_med_form_MC <= x))

These binaries (installable software) and packages are in development.
They may not be fully stable and should be used with caution. We make no claims about them.
Health stats visible at Monitor.