Skip to content

Commit

Permalink
array dim bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
michellepistner committed May 14, 2024
1 parent e8ce9de commit b6f9872
Show file tree
Hide file tree
Showing 3 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion R/bassetfit_s3.R
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@ predict.bassetfit <- function(object, newdata=NULL, response="Lambda", size=NULL

if(!is.function(object$Theta[[k]])){
for(i in 1:object$iter){
Lambda_tmp[[k]][,,i] <- object$Lambda[[k]][,,i, drop = FALSE] %*% newdata[object$linear,,drop = FALSE]
Lambda_tmp[[k]][,,i] <- drop(object$Lambda[[k]][,,i, drop = FALSE]) %*% newdata[object$linear,,drop = FALSE]
}
} else{
Theta <- object$Theta[[k]](cbind(object$X, newdata))
Expand Down
2 changes: 1 addition & 1 deletion R/fidofit_methods.R
Original file line number Diff line number Diff line change
Expand Up @@ -550,7 +550,7 @@ predict.pibblefit <- function(object, newdata=NULL, response="LambdaX", size=NUL
if (is.null(object$Lambda)) stop("pibblefit object does not contain samples of Lambda")
LambdaX <- array(0, dim = c(object$D-1, nnew, iter))
for (i in 1:iter){
LambdaX[,,i] <- object$Lambda[,,i, drop = FALSE] %*% newdata
LambdaX[,,i] <- drop(object$Lambda[,,i, drop = FALSE]) %*% newdata
}
if (use_names) LambdaX <- name_array(LambdaX, object,
list("cat", colnames(newdata),
Expand Down
Binary file modified tests/testthat/Rplots.pdf
Binary file not shown.

0 comments on commit b6f9872

Please sign in to comment.