diff options
| author | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-03-04 16:57:45 -0500 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2016-03-04 16:57:45 -0500 |
| commit | 8605a991b58225cf2a5fbf75e7d1569c295a8a01 (patch) | |
| tree | 8ba87c31d63fed23e7ec6450a40ba287d7ba3e86 /R/test.R | |
| parent | c88de7427189fa6617da3ba5c8c11db66ab150dd (diff) | |
| download | lossdistrib-Rcpp.tar.gz | |
test fileRcpp
Diffstat (limited to 'R/test.R')
| -rw-r--r-- | R/test.R | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/R/test.R b/R/test.R new file mode 100644 index 0000000..f6ad562 --- /dev/null +++ b/R/test.R @@ -0,0 +1,20 @@ +library(Rcpp) +sourceCpp("src/lossdistrib.cpp") +#source("R/distrib.R") +p <- runif(125) +w <- runif(125) +w <- w/sum(w) +S <- runif(125) +N <- 200 +q1 <- lossdistrib(p, w, S, N) +#q2 <- lossdistrib(p, w, S, N) + +rho <- rep(0.4, 125) +temp <- GHquad(500) +Z <- temp$Z +wZ <- temp$w +#cat(shockprob(runif(1), runif(1), 1),"\n") +## S <- matrix(runif(125*500), 125, 500) +## lossdistrib_Z(p, w, S, N, rho, Z) +defaultprob <- matrix(runif(125* 25), 125, 25) +r <- BCloss_recov_dist(defaultprob, w, S, Z, wZ, rho, 200) |
