ecdf_cpp: C++ implementation of empirical cdf

Description Usage Arguments Examples

Description

C++ implementation of empirical cdf

Usage

1
ecdf_cpp(sobs, sref)

Arguments

sobs

the observation for which the cdf is to be evaluated

sref

the reference observations from which the cdf is to be constructed

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
## Not run: 
library(microbenchmark)
fi <- rnorm(n=1000)
n_new <- 100
fnew <- rnorm(n=n_new)
microbenchmark(#sum.I(c(fi, fnew), FUN=">=", fnew)/n_new,
   ecdf(fnew)(c(fi, fnew)),
   ecdf_cpp(c(fi, fnew), sort(fnew))/n_new
)
## End(Not run)

stepcie/sslcov documentation built on May 30, 2019, 2:39 p.m.