Convenience function to create a truncated normal prior

createTruncatedNormalPrior(mean, sd, lower, upper)

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

See also

createPriorDensity createPrior createBetaPrior createUniformPrior createBayesianSetup

Examples

prior <- createTruncatedNormalPrior(c(0,0),c(0.4,5), lower = c(-2,-2), upper = c(1,1)) prior$density(c(2,3))
#> [1] -Inf
prior$density(c(0.2,0.9))
#> [1] -1.216469
prior$sampler()
#> [1] 0.2413041 -1.7412878