Skip to content

Commit

Permalink
small edits to predict for type = terms
Browse files Browse the repository at this point in the history
  • Loading branch information
Nicholas Clark committed Dec 10, 2024
1 parent d6edefd commit 5bd546b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions R/predict.mvgam.R
Original file line number Diff line number Diff line change
Expand Up @@ -505,9 +505,9 @@ terms_preds = function(object, newdata, summary = TRUE,
series = 'all',
mgcv_model = object$trend_mgcv_model)
betas <- mcmc_chains(object$model_output, 'b_trend')
effect_names <- colnames(predict(object$trend_mgcv_model,
type = 'terms',
se.fit = FALSE))
effect_names <- colnames(predict(relabel_gps(object$trend_mgcv_model),
type = 'terms',
se.fit = FALSE))
effect_names <- gsub('series', 'trend',
effect_names, fixed = TRUE)
coef_names <- names(coef(object$trend_mgcv_model))
Expand All @@ -517,9 +517,9 @@ terms_preds = function(object, newdata, summary = TRUE,
Xp <- obs_Xp_matrix(newdata = newdata,
mgcv_model = object$mgcv_model)
betas <- mcmc_chains(object$model_output, 'b')
effect_names <- colnames(predict(object$mgcv_model,
type = 'terms',
se.fit = FALSE))
effect_names <- colnames(predict(relabel_gps(object$mgcv_model),
type = 'terms',
se.fit = FALSE))
coef_names <- names(coef(object$mgcv_model))
}

Expand Down

0 comments on commit 5bd546b

Please sign in to comment.