dkcens2_1val: Density evaluation once

View source: R/dkcens2_1val.R

dkcens2_1valR Documentation

Density evaluation once

Description

Computes the likelihood contribution for one data point in the case of censoring.

Usage

dkcens2_1val(xleft, xright, c_code, distr = NULL, mu = NULL, sigma = NULL)

Details

For internal use

Examples


## The function is currently defined as
function(xleft, xright, c_code, distr = NULL, mu = NULL, sigma = NULL) {
  if (c_code == 1) {
    dk(x = xleft, distr, mu, sigma)
  } else if (c_code == 2) {
    pk(xright, distr, mu, sigma)
  } else if (c_code == 0) {
    1 - pk(xleft, distr, mu, sigma)
  } else if (c_code == 3) {
    pk(xright, distr, mu, sigma) - pk(xleft, distr, mu, sigma)
  } else {
    stop("Wrong integer code for censored data")
  }
}

konkam/BNPdensity documentation built on March 14, 2024, 7:15 a.m.