Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

Gauss

Multivariate Gauss Distribution


Description

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

Usage

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

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

Provides R-Language Code to Examine Quantitative Risk Management Concepts

v0.4-31
GPL (>= 2)
Authors
Bernhard Pfaff [aut, cre], Marius Hofert [ctb], Alexander McNeil [aut] (S-Plus original (QRMlib)), Scott Ulmann [trl] (First R port as package QRMlib)
Initial release
2020-02-15

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.