R/mean3.R

Defines functions mean3

Documented in mean3

### Location estimate based on 3rd moments
###
###

mean3 <- function(X, na.action = na.fail)
    {
    X<-na.action(X)
    p <- dim(X)[2]
    if (p<2) stop("'X' must be at least bivariate")
    n <- dim(X)[1]
    cor.fac <- (n-1)/n
    r.i.2 <- mahalanobis(X, colMeans(X), cor.fac*cov(X))
    Y <- sweep(X,1,r.i.2,"*")
    colMeans(Y)/p
    }

Try the ICS package in your browser

Any scripts or data that you put into this service are public.

ICS documentation built on May 1, 2019, 6:30 p.m.