AUTO_VI$p_value {autovi} | R Documentation |
Compute the p-value based on the check result
Description
This function computes the p-value of observing the visual signal strength of the original residual plot based on the null distribution.
Usage
AUTO_VI$p_value( vss = self$check_result$observed$vss, null_dist = self$check_result$null$vss, type = "auto" )
Arguments
type |
Character. Either "auto", "quantile" or "lineup". Option
"auto" will use the Boolean flag |
Details
There are two types of p-value calculation. Option "quantile" calculates the percentage of null visual signal strength greater than or equal to the observed visual signal strength. Option "lineup" combines the null visual signal strength and the observed visual signal strength in one vector, and calculates the percentage of entries in this vector greater than or equal to the observed visual signal strength. The "lineup" option ensures the p-value will not be smaller than 1 over the size of the lineup.
Value
A numeric value representing the desired p-value.
Examples
vss <- 1
null_dist <- rnorm(100, 0, 1)
AUTO_VI$p_value(vss, null_dist)