matpower: Raise a symmetric matrix to the pth power

Description Usage Arguments Value Examples

View source: R/utilities.R

Description

Raise a symmetric matrix to the pth power

Usage

1
matpower(X, p = -1)

Arguments

X

a matrix

p

a power. defaults to -1 for an inverse.

Value

a matrix

Examples

1
2
# gives the square root of the covariance matrix
matpower(cov(iris[,1:4]), 0.50)

abnormally-distributed/cvreg documentation built on May 3, 2020, 3:45 p.m.