| feature.test | R Documentation |
Performs a weighted permutation test for the null hypothesis that the weighted mean of (var1 - var2) is zero.
feature.test(var1, var2, weights, n = 2000)
var1 |
A numeric vector. |
var2 |
A numeric vector of the same length as |
weights |
A numeric vector of non-negative weights of the same length as |
n |
Integer. Number of permutations (default 2000). |
A list with:
Observed weighted mean difference (var1 - var2).
Monte Carlo permutation p-value.
## Not run:
var1 <- rnorm(100)
var2 <- rnorm(100)
weights <- runif(100)
result <- shapley:::feature.test(var1, var2, weights)
result$mean_wmshap_diff
result$p_value
## End(Not run)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.