Skip to contents

This function estimates the likelihood of observing the visual signal strength in terms of the bootstrapped distribution and the simulated null distribution, and computes the ratio between these two likelihood.

Usage

AUTO_VI$likelihood_ratio(
  vss = self$check_result$observed$vss,
  dist_1 = self$check_result$boot$vss,
  dist_2 = self$check_result$null$vss
)

Arguments

vss

Numeric. The observed visual signal strength.

dist_1

Numeric. A vector of visual signal strength for plots following the first distribution (bootstrap distribution by default).

dist_2

Numeric. A vector of visual signal strength for plots following the second distribution (null distribution by default).

Value

A named vector with three elements likelihood_1, likelihood_2 and likelihood_ratio.

Examples


dist_1 <- rnorm(100, 0, 1)
dist_2 <- rnorm(100, 1, 1)
AUTO_VI$likelihood_ratio(0, dist_1, dist_2)
#>     likelihood_1     likelihood_2 likelihood_ratio 
#>        0.3959076        0.2388632        1.6574664