Learn R Programming

GGMridge (version 1.4)

scaledMat: Scale a square matrix

Description

Scale a square matrix to have unit diagonal elements.

Usage

scaledMat(x)

Value

Scaled matrix of x.

Arguments

x

A square matrix with positive diagonal elements

Author

Min Jin Ha

Examples

Run this code
 ###############################
 # Simulate data
 ###############################
 simulation <- simulateData(G = 100, etaA = 0.02, n = 50, r = 10)
 dat <- simulation$data[[1L]]
 correlation <- scaledMat(x = stats::cov(dat))

Run the code above in your browser using DataLab