R: Assemble a Correlation Matrix for ML Copula Fitting
Pconstruct
R Documentation
Assemble a Correlation Matrix for ML Copula Fitting
Description
This function converts a vector of values representing the terms of a
lower triangular matrix A with ones on the diagonal and
returns the correlation matrix corresponding to the covariance matrix
AA' (see page 235 in QRM).
Usage
Pconstruct(theta)
Arguments
theta
vector, elements of a lower triangular matrix
A with ones on the diagonal.
Value
matrix
See Also
link{Pdeconstruct}
Examples
P <- Pconstruct(1:6)
eigen(P)
Pdeconstruct(P)
Results
R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(QRM)
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
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/QRM/Pconstruct.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Pconstruct
> ### Title: Assemble a Correlation Matrix for ML Copula Fitting
> ### Aliases: Pconstruct
> ### Keywords: array
>
> ### ** Examples
>
> P <- Pconstruct(1:6)
> eigen(P)
$values
[1] 3.0014434375 0.7409637346 0.2570061202 0.0005867077
$vectors
[,1] [,2] [,3] [,4]
[1,] -0.4010968 0.8095946 0.3497379 -0.2477122
[2,] -0.5557703 0.1353948 -0.4794124 0.6655460
[3,] -0.5446668 -0.3069388 -0.3920949 -0.6748247
[4,] -0.4833000 -0.4816777 0.7029287 0.2007458
> Pdeconstruct(P)
[1] 1 2 3 4 5 6
>
>
>
>
>
> dev.off()
null device
1
>