Learn R Programming

MCMCglmm (version 1.06)

Ptensor: Tensor of Sample (Mixed) Central Moments

Description

Forms a tensor of sample (mixed) central moments

Usage

Ptensor(x, k)

Arguments

x
matrix; traits in columns samples in rows
k
kth central moment

Value

  • tensor

Examples

Run this code
n<-1000
y<-mvrnorm(n, c(0,0), diag(2))
Ptensor(y,2)
cov(y)*((n-1)/n)

Run the code above in your browser using DataLab