Skip to content

nimbleOccu use of nimbleHMC via suggests #30

Description

@paciorek

We're currently planning to include a wrapper function, nimbleOccu, to provide lme4-like interface for setting up occupancy models using macros and (optionally) running MCMC.

If we try to use nimbleHMC via suggests, sampler_NUTS is not found when invoking configureHMC.

@kenkellner I think a work-around is to do this (avoiding configureHMC, which is just a convenience wrapper):

    conf <- configureMCMC(mod, nodes = NULL, print = FALSE)
    conf$addSampler(nimbleHMC::sampler_NUTS, target = 'mu',
                    control = list(warmupMode = "iterations", warmup=100))

That way sampler_NUTS is found via namespace resolution within nimbleOccu and passed in, so that we're not trying to find it from within nimble's MCMC configuration code, which does not know about nimbleHMC namespace objects.

I'm going to file an issue on nimbleHMC to consider the more general issue that this reveals.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions