normal: GPU Normal Distribution

Description Usage Arguments Details Value Author(s) See Also Examples

Description

Density, distribution function, quantile function and random generation for the normal distribution with mean equal to mean and standard deviation equal to sd. All functions performed on the GPU.

Usage

1
2
3
4
5
6
gdnorm(x, mean = 0, sd = 1, log = FALSE, type = "d")
grnorm(n, mean = 0, sd = 1, type = "d")
gqnorm(q, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE,
       warn = TRUE, type = "d")
gpnorm(p, mean = 0, sd = 1, lower.tail = TRUE, log.p = FALSE,
       warn = TRUE, type = "d")

Arguments

x,q

vector of quantiles

p

vector of probabilities

n

number of observations

mean

vector of means

sd

vector of standard deviations

log, log.p

logical; if TRUE, probabilities p are given as log(p)

lower.tail

logical; if TRUE (default), probabilities are P[X < x] otherwise, P[X > x].

warn

logical; if FALSE then additional warnings are disabled.

type

specify the type; may be "double", "single" (or short form "d" or "s")

Details

Very similar to the R stats functionality. However, gqnorm and gpnorm are implement currently in a way that is NOT numerically precise in the deep tails. Future releases may fix this problem.

Value

gdnorm gives the density, gpnorm gives the distribution function, gqnorm gives the quantile function, and grnorm generates random deviates.

Author(s)

Nathan Morris

See Also

dnorm

Examples

1
2
myRndNums1 = grnorm(100) #standard normals
myRndNums2 = grnorm(100, mean=c(1,2), sd=c(1,2,4,6))

gmatrix documentation built on May 29, 2017, 2:20 p.m.