gen.cov.mat: Generate population covariance matrix with dimension p.

View source: R/general_functions.R

gen.cov.matR Documentation

Generate population covariance matrix with dimension p.

Description

Generate population covariance matrix with dimension p.

Usage

gen.cov.mat(p, sigma2, type)

Arguments

p

A integer scalar of dimensionality.

sigma2

A positive numeric scalar representing the variance of each entry.

type

Specify the type of a covariance matrix: Diagonal structure ("diagonal"); Equal correlation structure ("equal"); Power decay structure ("power").

Value

A numeric p-by-p matrix.

Author(s)

Haotian Xu

Examples

gen.cov.mat(p = 5, sigma2 = 1, type = "diagonal")

changepoints documentation built on Sept. 4, 2022, 5:06 p.m.