Learn R Programming

MultiSkew (version 1.1.1)

SkewBoot: Bootstrap inference for multivariate skewness measures

Description

Computes the bootstrap distribution, its histogram and the corresponding p-value of the chosen measure of multivariate skewness (Mardia, Partial or Directional), using a given number of bootstrap replicates.

Usage

SkewBoot(data, replicates, units, type)

Arguments

data

data matrix

replicates

number of bootstrap replicates

units

number of rows in the data matrices sampled from the original data matrix

type

"Directional", "Partial" or "Mardia". If type is set equal to "Directional" or "Mardia", units is an integer greater than the number of variables. If type set equal to "Partial", units is an integer greater than the number of variables + 1

Value

histogram

plot of the above mentioned bootstrap distribution

Pvalue

p-value of the chosen skewness measure

Vector

vector containing the bootstrap replicates of the chosen skewness measure

%% ...

Details

The function calls the package MaxSkew 1.1, which needs to be downloaded. The number of iterations required by the package MaxSkew is set equal to 5.

Examples

Run this code
library(MaxSkew)
data(PM10_2006)
PM10_2006_matrix<-data.matrix(PM10_2006)
#source("SkewBoot.R")
#SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Partial")
#SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Mardia")
#SkewBoot(PM10_2006_matrix[,2:5], 50, 50, "Directional")

Run the code above in your browser using DataLab