Skip to content

need to handle varying blocks of indices into a variable #31

Description

@paciorek

Consider this case:

   code <- quote({
        for(i in 1:3)
            y[i, n1[i]:n2[i]] ~ dmnorm(mu[n1[i]:n2[i]], pr[n1[i]:n2[i],n1[i]:n2[i]])
    })
    model <- nimbleModel(code, constants = list(n1 = c(3,1,2), n2 = c(6,3,3)))

This is allowed in nimble so long as n1 and n2 are constants.

Currently it is error-trapped in modelDecl.R even when provided as constants.

Noting also that if I simply turn the error trap off, we end up with an error later on:

Error in names(boundExprs)[names(boundExprs) %in% c("lower", "upper")] <- paste0(names(boundExprs)[names(boundExprs) %in%  : 
  attempt to set an attribute on NULL

in reparameterizeDists.

Need to come back to this and fix up. I am expecting it to be reasonably straightforward.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions