inst/doc/vignette1.R

## ----setup, include=FALSE, cache=FALSE--------------------------------------------------
library(knitr)
# set global chunk options
opts_chunk$set(fig.path='figure/minimal-', fig.align='center', fig.show='hold')
options(formatR.arrow=TRUE,width=90)

## ----datagen, cache=TRUE, echo=TRUE-----------------------------------------------------
set.seed(12345)
suppressMessages(library(mhtboot))
n = 50;m = 500;m0 = 20;
sigeff = 1;
Sigma <- 0.25*diag(m)
X <- datgen(n,m,m0,sigeff,Sigma = Sigma)
plot(density(X[,1]),main="density plot of coord 1")

## ----pboot,cache=TRUE,echo=TRUE---------------------------------------------------------
porder <- pboot.1sample(X=X,B=250,ncpus = 1)
plotpboot(porder = porder)

## ----ptrans,echo=TRUE,cache=TRUE--------------------------------------------------------
porder.tr <- ptrans(porder,trans="normal")
plotpboot(porder.tr)

## ----hitplots,cache=TRUE,echo=TRUE------------------------------------------------------
porder <- ptrans(porder = porder)
hitplots(porder = porder,alpha = 0.005)

## ----qelbow,echo=TRUE,cache=TRUE--------------------------------------------------------
out <- qelbow(porder = porder)
out

## ----mhtmain,echo=TRUE,cache=TRUE-------------------------------------------------------
out1 <- mht.1sample(X,ncpus = 1)
out1$cutoff
out1$signal

Try the mhtboot package in your browser

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

mhtboot documentation built on May 2, 2019, 8:15 a.m.