R/safeNormPDF.R

Defines functions `safeNormPDF`

`safeNormPDF` <-
function(x) {
    G.THRESH.NORM.PDF <-  35;     ## threshold used to avoid numerical problem
    x[x < -G.THRESH.NORM.PDF] <- -G.THRESH.NORM.PDF;
    x[x >  G.THRESH.NORM.PDF] <-  G.THRESH.NORM.PDF;
    dnorm(x);
}

Try the vbmp package in your browser

Any scripts or data that you put into this service are public.

vbmp documentation built on Nov. 8, 2020, 5:38 p.m.