Gauss: Multivariate Gauss Distribution

Description Usage Arguments Examples

Description

Functions for evaluating multivariate normal density, generating random variates, fitting and testing.

Usage

1
2
3
4
5
dmnorm(x, mu, Sigma, log = FALSE)
fit.norm(data)
rmnorm(n, mu = 0, Sigma)
MardiaTest(data)
jointnormalTest(data, dist = c("chisquare", "beta"), plot = TRUE)

Arguments

data

matrix, data set.

dist

character, “chisquare” performs test against chi-squared distribution, which is an approximation; “beta” performs a test against a scaled beta distribution.

log

logical, whether log density values shall be returned.

n

integer, count of random variates.

mu

numeric, location parameters.

plot

logical, whether test result shall be plotted.

Sigma

matrix, covariance matrix.

x

matrix, density is evaluated per row.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
library(QRM)
BiDensPlot(func = dmnorm, mu = c(0, 0), Sigma = equicorr(2, -0.7))
S <- equicorr(d = 3, rho = 0.7)
data <- rmnorm(1000, Sigma = S)
fit.norm(data)
S <- equicorr(d = 10, rho = 0.6)
data <- rmnorm(1000, Sigma = S) 
MardiaTest(data)
## Dow Jones Data
data(DJ)
r <- returns(DJ) 
stocks <- c("AXP","EK","BA","C","KO","MSFT",
            "HWP","INTC","JPM","DIS")
ss <- window(r[, stocks], "1993-01-01", "2000-12-31")
jointnormalTest(ss) 

QRM documentation built on April 14, 2020, 6:49 p.m.