createTruncatedNormalPrior: Convenience function to create a truncated normal prior

Description Usage Arguments Note Author(s) See Also Examples

View source: R/classPrior.R

Description

Convenience function to create a truncated normal prior

Usage

1

Arguments

mean

best estimate for each parameter

sd

sdandard deviation

lower

vector of lower prior range for all parameters

upper

vector of upper prior range for all parameters

Note

for details see createPrior

Author(s)

Florian Hartig

See Also

createPriorDensity
createPrior
createBetaPrior
createUniformPrior
createBayesianSetup

Examples

1
2
3
4
prior <- createTruncatedNormalPrior(c(0,0),c(0.4,5), lower = c(-2,-2), upper = c(1,1))
prior$density(c(2,3))
prior$density(c(0.2,0.9))
prior$sampler()

Example output

[1] -Inf
[1] -1.216469
[1]  0.3115631 -0.2210735

BayesianTools documentation built on Dec. 10, 2019, 1:08 a.m.