equicorr: Equal Correlation Matrix

Description Usage Arguments Value Examples

View source: R/Correlations.R

Description

Construction of an equal correlation matrix

Usage

1
equicorr(d, rho)

Arguments

d

integer, dimension of matrix

rho

numeric, value of correlation

Value

matrix

Examples

1
2
3
4
5
6
equicorr(7, 0.5)
ll <- c(0.01, 0.99)
BiDensPlot(func = dcopula.gauss, xpts = ll, ypts = ll,
           Sigma = equicorr(2,0.5))
BiDensPlot(func = dcopula.t, xpts = ll, ypts = ll , df = 4,
           Sigma = equicorr(2, 0.5)) 

Example output

Loading required package: gsl
Loading required package: Matrix
Loading required package: mvtnorm
Loading required package: numDeriv
Loading required package: timeSeries
Loading required package: timeDate

Attaching package: 'QRM'

The following object is masked from 'package:base':

    lbeta

     [,1] [,2] [,3] [,4] [,5] [,6] [,7]
[1,]  1.0  0.5  0.5  0.5  0.5  0.5  0.5
[2,]  0.5  1.0  0.5  0.5  0.5  0.5  0.5
[3,]  0.5  0.5  1.0  0.5  0.5  0.5  0.5
[4,]  0.5  0.5  0.5  1.0  0.5  0.5  0.5
[5,]  0.5  0.5  0.5  0.5  1.0  0.5  0.5
[6,]  0.5  0.5  0.5  0.5  0.5  1.0  0.5
[7,]  0.5  0.5  0.5  0.5  0.5  0.5  1.0

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