···88 written in base R. This implementation attempts to stick very closely
99 to the algorithm described in Section 2 and Appendix A of the paper.
1010License: MIT + file LICENSE
1111+Imports:
1212+ stats
1113Suggests:
1214 matrixStats
1315Encoding: UTF-8
+2
NAMESPACE
···11# Generated by roxygen2: do not edit by hand
2233export(NURS)
44+importFrom(stats,rnorm)
55+importFrom(stats,runif)
+4
R/NURS.R
···1212#'
1313#' @param log_vals orbit
1414#' @param log_eps_h log(epsilon) + log(h)
1515+#'
1516#' @returns True if Orbit satisfies stopping criterion.
1617NURS_stop <- function(log_vals, log_eps_h) {
1718 max(log_vals[1], log_vals[length(log_vals)]) <=
···2223#'
2324#' @param log_vals sub orbit
2425#' @param log_eps_h log(epsilon) + log(h)
2626+#'
2527#' @returns True if sub orbit satisfies stopping criterion.
2628NURS_sub_stop <- function(log_vals, log_eps_h) {
2729 n <- length(log_vals)
···3941#' @param epsilon density threshold
4042#' @param h lattice size
4143#' @param M maximum number of doublings
4444+#'
4245#' @returns next draw
4346NURS_step <- function(logpdf, theta, epsilon, h, M) {
4447 d <- length(theta)
···110113#' @param epsilon non-negative density threshold
111114#' @param h positive lattice size
112115#' @param M maximum number of doublings
116116+#'
113117#' @returns a sequence of draws
114118#'
115119#' @export
···20202121A Base R, simple implementation of the No-Underrun Sampler. This implementation aims to mostly directly implement the algorithm as described by the paper, with at most small changes for code aesthetics and performance. This version uses the memory saving technique described in section 2.2.
22222323+This code doesn't parallelize the density calculation for orbit extensions but doing so is trivial.
2424+2325## Installation
24262527You can install the development version of R.NURS from [GitHub](https://github.com/) with:
+3
README.md
···1313and performance. This version uses the memory saving technique described
1414in section 2.2.
15151616+This code doesn’t parallelize the density calculation for orbit
1717+extensions but doing so is trivial.
1818+1619## Installation
17201821You can install the development version of R.NURS from
+15
man/R.NURS-package.Rd
···11+% Generated by roxygen2: do not edit by hand
22+% Please edit documentation in R/R.NURS-package.R
33+\docType{package}
44+\name{R.NURS-package}
55+\alias{R.NURS}
66+\alias{R.NURS-package}
77+\title{R.NURS: R Implementation of No-Underrun Sampler}
88+\description{
99+A bare-bones R implementation of the No-Underrun Sampler (Nawaf Bou-Rabee, Bob Carpenter, Sifan Liu, Stefan Oberdörster. 2025.) written in base R. This implementation attempts to stick very closely to the algorithm described in Section 2 and Appendix A of the paper.
1010+}
1111+\author{
1212+\strong{Maintainer}: Visruth Srimath Kandali \email{public@visruth.com}
1313+1414+}
1515+\keyword{internal}