diff options
| author | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2015-09-23 15:32:01 -0400 |
|---|---|---|
| committer | Guillaume Horel <guillaume.horel@serenitascapital.com> | 2015-09-23 15:32:01 -0400 |
| commit | 96ef5e51cd95ef074cf50c76f049564c48da3c90 (patch) | |
| tree | bf5ba3ad03ed5744ead45cc3ce81e739af9ec8d3 | |
| parent | d2e3b9cb9758b22887dfaf0118c9e3e1085e28d8 (diff) | |
| download | lossdistrib-96ef5e51cd95ef074cf50c76f049564c48da3c90.tar.gz | |
double transpose!
| -rw-r--r-- | R/distrib.R | 3 |
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))
|
