nimble-dev / nimble

The base NIMBLE package for R
http://R-nimble.org
BSD 3-Clause "New" or "Revised" License
156 stars 23 forks source link

partial matching warning if option warnPartialMatchDollar is TRUE #1416

Closed sebdalgarno closed 4 months ago

sebdalgarno commented 7 months ago

In argList$model : partial match of 'model' to 'modelValues'

Note this only occurs if the option warnPartialMatchDollar is TRUE

simple repress

options(warnPartialMatchDollar = TRUE)
library(nimble)

constants <- list(x = 1:10, nobs = 10)
data <- data.frame(y = 2:12)

code <- nimble::nimbleCode({

  b ~ dunif(1, 10)

  for(i in 1:nobs) {
    ey[i] <- x[i] + b
    y[i] ~ dnorm(ey[i], sd = 2)
  }
})

fit <- nimbleMCMC(code = code,
                  constants = constants, 
                  data = data)
paciorek commented 4 months ago

Fixed by #1422