simany | R Documentation |
Simulates the test statistic, under independence
simany(sampsize,dimension,subsampsizes,sampnum,nbsafe=5,nthreads=2, fun=NULL, ...)
sampsize |
sample size |
dimension |
sample dimension |
subsampsizes |
vector of sub-sample sizes |
sampnum |
number of samples |
nbsafe |
the ratio between the number of sub-samples and the cardinality of the discretized copula. |
nthreads |
number of number of threads, assumed to be strictly positive. For "full throttle" computations, consider using parallel::detectCores() |
fun |
the function describing the dependence. |
... |
optional arguments to |
lrs |
the distances with independent case |
lrs2mean |
the distances with theoretical value, given dependence |
scarcities |
the proportions of non-reached vector ranks |
DistTypes |
a recall of the list of the distance types: "KL","L2","L1","APE" |
Jerome Collet
depquad <- function(lon,dd,a)
{
x <- rnorm(lon)
y0 <- a*x^2
y <- y0 + rnorm(lon)
reste=rnorm((dd-2)*lon)
return(c(x,y,reste))
}
sims0=simany(101,3,8,50,nbsafe=1)
seuils=apply(sims0$lrs,3,quantile,0.95)
seuils=matrix(ncol=4,nrow=50,seuils,byrow=TRUE)
sims1=simany(101,3,8,50,nbsafe=1,fun=depquad,a=0.5)
apply(sims1$lrs[,1,]>seuils,2,mean)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.