summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--R/test.R20
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)