simnul | R Documentation |
Simulates the test statistic, under independence
simnul(sampsize, dimension, subsampsizes, sampnum,KL=TRUE,nbsafe=5,nthreads=2)
sampsize |
sample size |
dimension |
sample dimension |
subsampsizes |
vector of sub-sample sizes |
sampnum |
number of samples |
KL |
if TRUE, returns the Kullback-Leibler divergence with the independent case, if FALSE, the L2 distance. There is no re-normalization, contrary to what happens for |
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() |
lrs |
the distances with independent case |
scarcities |
the proportions of non-reached vector ranks |
Jerome Collet
library(datasets)
# plot(swiss)
c=corc(swiss,1:3,8)
c
RV=sum(c$cop*log(c$cop),na.rm=TRUE)+3*log(8)
sims=simnul(47,3,8,100)
pvalue=mean(RV<sims$lrs)
pvalue
RV
summary(sims$lrs)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.