MCMCglmm (version 2.35)

Ptensor: Tensor of Sample (Mixed) Central Moments

Description

Forms a tensor of sample (mixed) central moments

Usage

Ptensor(x, k)

Value

tensor

Arguments

x

matrix; traits in columns samples in rows

k

kth central moment

Author

Jarrod Hadfield j.hadfield@ed.ac.uk

Examples

Run this code
n<-1000
y<-matrix(rnorm(n), n/2, 2)
Ptensor(y,2)
cov(y)*((n-1)/n)

Run the code above in your browser using DataLab