Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Easier specification of bounds for parameters #22

@dmi3kno

Description

@dmi3kno

I understand that model kernels have lb and ub arguments for specifying the parameter bounds.

I have a mix of bounded and unbounded parameters. Some parameters are on [0,1] others are [0,$\infty$]. I understand that for unbounded parameters I should provide .Machine$double.xmax, but that is somehow inconvenient to remember.

Ideally, I would love to specify the bounds per parameter in a named vector like this

kernel_ram( ..., lb=c(alpha=NA, beta=0,gamma=0), ub=c(alpha=NA, beta=1, gamma=NA))

This should be interpreted as: alpha is unbounded, beta is bounded on [0,1] and gamma is positive values only.

Alternatively, if you don't want to rewrite the lb, ub, I think including the bounds=list(alpha=NA, beta=c(0,1), gamma=c(0,NA)) into the main function fmcmc::MCMC might be an OK solution. Then you can only look up to this argument in the main function and if the bounds are defined, the kernel would inherit them.

Does this make any sense? I am trying to mimic the parameter specification in Stan where for each parameter I can specify the lower and upper bound right in the parameter declaration block.

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