discnorm: (non-parametric) discrete normal distribution

Description Usage Arguments Details

Description

The density and the distribution function of (non-parametric) discrete normal distribution

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
ddiscnorm(x, mean = 0, sd = 1, h = 1, log = FALSE)

dnpdiscnorm(
  x,
  mu0 = 0,
  pi0 = 0,
  sd = 1,
  h = 1,
  lower.tail = TRUE,
  log.p = FALSE
)

pdiscnorm(x, mean = 0, sd = 1, h = 1, lower.tail = TRUE, log.p = FALSE)

pnpdiscnorm(
  x,
  mu0 = 0,
  pi0 = 0,
  sd = 1,
  h = 1,
  lower.tail = TRUE,
  log.p = FALSE
)

Arguments

x

vector of observations, vector of quantiles

sd

standard deviation.

h

the discretisation parameter.

log, log.p

logical; if TRUE, the result will be given in log scale.

mu0, mean

the vector of support points

pi0

the vector of weights correponding to the support points mu0

lower.tail

logical; if TRUE, the lower probability is computed

Details

ddiscnorm gives the density, pdiscnorm gives the distribution function of the discrete normal distribution. dnpdiscnorm gives the density, pnpdiscnorm gives the distribution function of the non-parametric discrete normal distribution.

The function pnpdiscnorm uses pnpnorm1 to compute the distribution function.


xiangjiexue/npfixedcompR documentation built on Jan. 1, 2021, 11:39 p.m.