diff --git a/R/get_linear_predictors.R b/R/get_linear_predictors.R index 33fc093b..b8942b72 100644 --- a/R/get_linear_predictors.R +++ b/R/get_linear_predictors.R @@ -10,7 +10,7 @@ obs_Xp_matrix = function(newdata, mgcv_model){ testdat <- data.frame(time = newdata$time) terms_include <- insight::find_predictors(mgcv_model)$conditional - if(any(terms_include %in% names(trend_test) == FALSE)){ + if(any(terms_include %in% names(newdata) == FALSE)){ stop('not all required variables have been supplied in newdata!', call. = FALSE) } diff --git a/src/mvgam.dll b/src/mvgam.dll index fe64d771..498079f1 100644 Binary files a/src/mvgam.dll and b/src/mvgam.dll differ diff --git a/tests/testthat/Rplots.pdf b/tests/testthat/Rplots.pdf index 47f94e2c..5d576f9e 100644 Binary files a/tests/testthat/Rplots.pdf and b/tests/testthat/Rplots.pdf differ