jdnorm: jdnorm

Description Usage Arguments Value Examples

Description

This function returns the joint density from a bivariate random normal.

Usage

1
jdnorm(x, y, mean = c(0, 0), sd = c(1, 1), rho = 0)

Arguments

x, y

vector of quantiles

mean

vector of both means

sd

vector of both standard deviations

rho

correlation between the two normals

Value

numeric vector of joint densities

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## center of standard bivariate normal
jdnorm(x = 0, y = 0)

## change scale
jdnorm(x = 0, y = 0, sd = c(10, 10))

## change location
jdnorm(x = 5, y = 5, mean = c(5, 5))

## scale-location transform
jdnorm(x = 42, y = 42, mean = c(42, 42), sd = c(10, 10))

## multiple samples from correlated
jdnorm(x = c(1, -1, -1, 1), y = c(1, 1, -1, -1), rho = 0.5)

schuelkem/samplr documentation built on May 6, 2019, 7:19 a.m.