tests/test-gradients.R

# From SamplerCompare, (c) 2010 Madeleine Thompson

# This script checks ensures that some of the example distributions
# have gradient functions that match their log density functions.

library("SamplerCompare")

dists <- list(N2weakcor.dist, N4poscor.dist, N4negcor.dist, schools.dist)

for (dist in dists) {
  check.dist.gradient(dist, dist$mean + 0.1)
}

Try the SamplerCompare package in your browser

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

SamplerCompare documentation built on April 24, 2023, 9:09 a.m.