From 35abd8f89d4bce1f5503593ddccd964dfa8c662c Mon Sep 17 00:00:00 2001 From: Daniel Turek Date: Sun, 2 Jun 2024 07:45:55 -0400 Subject: [PATCH] fixed minor typo --- nimbleHMC/R/HMC_samplers.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nimbleHMC/R/HMC_samplers.R b/nimbleHMC/R/HMC_samplers.R index 5a16f90..215ce80 100644 --- a/nimbleHMC/R/HMC_samplers.R +++ b/nimbleHMC/R/HMC_samplers.R @@ -182,7 +182,7 @@ hmc_checkTarget <- function(model, targetNodes, hmcType) { dists <- targetDists_unique ADok <- rep(TRUE, length(dists)) for(i in seq_along(dists)) { - ADoak[i] <- model$getModelDef()$checkADsupportForDistribution(dists[i]) + ADok[i] <- model$getModelDef()$checkADsupportForDistribution(dists[i]) } if(!all(ADok)) stop(paste0(hmcType, ' sampler cannot operate on user-defined distributions which do not support AD calculations. Try using buildDerivs = TRUE in the definition the distributions: ', paste0(dists[!ADok], collapse = ', ')))