Entropy and Testing with np

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:

Main functions

The main entropy-based testing functions are:

These functions can be computationally demanding, especially when integration and bootstrap resampling are involved.

A small example

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)

Practical guidance

Where to go next



Try the np package in your browser

Any scripts or data that you put into this service are public.

np documentation built on May 3, 2026, 1:07 a.m.