Learn R Programming

sSDR (version 1.2.0)

cov.x: Covariance matrix

Description

Covariance matrix

Usage

cov.x(X)

Arguments

X
a n x p matrix of n observations and p predictors.

Value

A p x p covariance matrix.

Details

This function returns A p x p covariance matrix for any n x p matrix.

Examples

Run this code
data <- gen.data(n=100)
x.cov <- cov.x(data$X)

Run the code above in your browser using DataLab