# sampcov: Sample Covariance (biased) In coxjohn/Lab1Intro: Lab1Intro

## Description

Returns a (biased) covariance matrix for a data matrix

## Usage

 1 sampcov(x, varnames = NULL) 

## Arguments

 x a data set varnames a list of variable names

## Details

Accepts a data set and creates a $p\times p$ covariance matrix, where p is the number of variables. The function also accepts variable names that will be used to lable the columns of the matrix. These results are biased, as they use $\frac1n$ in the definition of the variance, rather than $\frac1n-1$.

## Examples

 1 sampcov(data, c("WEIGHT", "LENGTH", "DENSITY")) 

coxjohn/Lab1Intro documentation built on Jan. 26, 2020, 4:10 a.m.