knitr::opts_chunk$set( collapse = TRUE, comment = "#>" ) options(np.messages = FALSE)
This vignette is meant to be a small package-side introduction to the
entropy-based testing tools in np. It is intentionally much shorter than the
legacy article-style document and focuses on what the functions are for and one
small runnable example.
The fuller narrative treatment now belongs on the gallery site rather than in a shipped package vignette:
The main entropy-based testing functions are:
npdeneqtest: equality of multivariate densitiesnpunitest: equality of univariate densitiesnpsymtest: asymmetry in a univariate variable or seriesnpdeptest: nonlinear pairwise dependencenpsdeptest: nonlinear serial dependenceThese functions can be computationally demanding, especially when integration and bootstrap resampling are involved.
For a first run, it is reasonable to begin with a simple univariate comparison and keep the example small enough that bootstrapping remains practical.
library(np) set.seed(42) n <- 250 x <- rnorm(n) y <- rnorm(n) npunitest(x, y, bootstrap = TRUE)
npRmpi rather than rewriting the statistical problem.?npunitest, ?npdeneqtest, ?npdeptest, ?npsdeptest, ?npsymtestnpRmpiAny scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.