drcm: Density of the RCM model

Description Usage Arguments Value Examples

View source: R/RCM.R

Description

The density of the RCM model when the mean mu is non-zero. Used for the HDA analysis.

Usage

1
drcm(x, mu, Psi, nu, logarithm = FALSE)

Arguments

x

A numeric matrix of size n by m with observations in the rows and variables in the columns.

mu

A numeric vector of length m giving the mean values of the RCM in HDA.

Psi

A numeric matrix giving the parameter of the RCM.

nu

A numeric of length 1 giving the degrees of freedom.

logarithm

A Boolean of length 1. If TRUE, the log density is returned. Defaults to FALSE.

Value

Returns a vector of length n where the ith corresponds to the density evaluated in the ith row in x.

Examples

1
2
3
4
5
6
7
8
n <- 10
m <- 5
x <- matrix(rnorm(n*m), n, m)
mu <- rnorm(m)
Psi <- cov(matrix(rnorm(n*m), n, m))
nu <- 15
drcm(x, mu, Psi, nu)
drcm(x, mu, Psi, nu, logarithm = TRUE)

AEBilgrau/correlateR documentation built on Nov. 15, 2019, 9:21 a.m.