summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuillaume Horel <guillaume.horel@serenitascapital.com>2015-09-23 15:32:01 -0400
committerGuillaume Horel <guillaume.horel@serenitascapital.com>2015-09-23 15:32:01 -0400
commit96ef5e51cd95ef074cf50c76f049564c48da3c90 (patch)
treebf5ba3ad03ed5744ead45cc3ce81e739af9ec8d3
parentd2e3b9cb9758b22887dfaf0118c9e3e1085e28d8 (diff)
downloadlossdistrib-96ef5e51cd95ef074cf50c76f049564c48da3c90.tar.gz
double transpose!
-rw-r--r--R/distrib.R3
1 files changed, 3 insertions, 0 deletions
diff --git a/R/distrib.R b/R/distrib.R
index d941bd2..47a93a8 100644
--- a/R/distrib.R
+++ b/R/distrib.R
@@ -567,6 +567,9 @@ BClossdistC <- function(defaultprob, issuerweights, recov, rho, Z, w,
N=length(issuerweights)+1, defaultflag=FALSE){
stopifnot(length(Z)==length(w),
nrow(defaultprob)==length(issuerweights))
+ if(is.null(dim(defaultprob))){
+ dim(defaultprob) <- c(length(defaultprob),1)
+ }
L <- matrix(0, N, ncol(defaultprob))
R <- matrix(0, N, ncol(defaultprob))
rho <- rep(rho, length(issuerweights))