BNPdensity (version 2019.9.11)

dhalfnorm: Density half normal

Description

Computes the density.

Usage

dhalfnorm(x, mean = 0, sd = 1)

Arguments

Details

For internal use

Examples

Run this code
# NOT RUN {
## The function is currently defined as
function(x, mean = 0, sd = 1) {
  ifelse(x < 0, 0, 1) * dnorm(x, mean, sd) / (1 - pnorm(
    0, mean,
    sd
  ))
}
# }

Run the code above in your browser using DataCamp Workspace