Skip to content

Commit

Permalink
small bug fix in variance calculation for t
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed Mar 24, 2024
1 parent 7e041a5 commit 5698279
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/compute_edf.R
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,10 @@ compute_edf = function(mgcv_model, object, rho_names, sigma_raw_names){
# Calculate variance using family's mean-variance relationship
mu_variance <- predict(object,
process_error = FALSE,
type = 'variance')[best_draw, 1:length(eta)]
type = 'variance')[best_draw, ]
if(length(mu_variance) > 1){
mu_variance <- mu_variance[1:length(eta)]
}
if(any(mu_variance == 0)){
mu_variance[which(mu_variance == 0)] <-
mu[which(mu_variance == 0)]
Expand Down
Binary file modified src/mvgam.dll
Binary file not shown.

0 comments on commit 5698279

Please sign in to comment.