Logical indicating whether this is part of a call to lfo_cv.mvgam. Returns a
lighter version of the model with no residuals and fewer monitored parameters to speed up
@@ -214,19 +250,27 @@
if(FALSE){# Simulate some data and fit a Poisson AR1 model
-simdat<-sim_mvgam(n_series =1, trend_model ='AR1')
+simdat<-sim_mvgam(n_series =1, trend_model =AR())mod<-mvgam(y~s(season, bs ='cc'),
- trend_model ='AR1',
- data =simdat$data_train)
+ trend_model =AR(),
+ data =simdat$data_train)summary(mod)
+conditional_effects(mod, type ='link')# Update to an AR2 model
-updated_mod<-update(mod, trend_model ='AR2')
+updated_mod<-update(mod, trend_model =AR(p =2))summary(updated_mod)
+conditional_effects(updated_mod, type ='link')
-# Now update to a Negative Binomial AR1
-updated_mod<-update(mod, family =nb())
+# Now update to a Binomial AR1 by adding information on trials
+# requires that we supply newdata that contains the 'trials' variable
+simdat$data_train$trials<-max(simdat$data_train$y)+15
+updated_mod<-update(mod,
+ formula =cbind(y, trials)~s(season, bs ='cc'),
+ data =simdat$data_train,
+ family =binomial())summary(updated_mod)
+conditional_effects(updated_mod, type ='link')}
diff --git a/man/figures/README-unnamed-chunk-13-1.png b/man/figures/README-unnamed-chunk-13-1.png
index 11dd9bdb..09f75cdb 100644
Binary files a/man/figures/README-unnamed-chunk-13-1.png and b/man/figures/README-unnamed-chunk-13-1.png differ
diff --git a/man/figures/README-unnamed-chunk-14-1.png b/man/figures/README-unnamed-chunk-14-1.png
index fb9b521f..36bc2232 100644
Binary files a/man/figures/README-unnamed-chunk-14-1.png and b/man/figures/README-unnamed-chunk-14-1.png differ
diff --git a/man/figures/README-unnamed-chunk-15-1.png b/man/figures/README-unnamed-chunk-15-1.png
index b9314215..0aef7e7b 100644
Binary files a/man/figures/README-unnamed-chunk-15-1.png and b/man/figures/README-unnamed-chunk-15-1.png differ
diff --git a/man/figures/README-unnamed-chunk-16-1.png b/man/figures/README-unnamed-chunk-16-1.png
index 2bb0b7c2..78dc3d14 100644
Binary files a/man/figures/README-unnamed-chunk-16-1.png and b/man/figures/README-unnamed-chunk-16-1.png differ
diff --git a/man/figures/README-unnamed-chunk-17-1.png b/man/figures/README-unnamed-chunk-17-1.png
index 7581f43b..6afa071d 100644
Binary files a/man/figures/README-unnamed-chunk-17-1.png and b/man/figures/README-unnamed-chunk-17-1.png differ
diff --git a/man/figures/README-unnamed-chunk-18-1.png b/man/figures/README-unnamed-chunk-18-1.png
index 747a5f34..c799fe95 100644
Binary files a/man/figures/README-unnamed-chunk-18-1.png and b/man/figures/README-unnamed-chunk-18-1.png differ
diff --git a/man/figures/README-unnamed-chunk-19-1.png b/man/figures/README-unnamed-chunk-19-1.png
index 2f6d21eb..a66e6d6d 100644
Binary files a/man/figures/README-unnamed-chunk-19-1.png and b/man/figures/README-unnamed-chunk-19-1.png differ
diff --git a/man/figures/README-unnamed-chunk-20-1.png b/man/figures/README-unnamed-chunk-20-1.png
index 45c8febf..5b25c223 100644
Binary files a/man/figures/README-unnamed-chunk-20-1.png and b/man/figures/README-unnamed-chunk-20-1.png differ
diff --git a/man/figures/README-unnamed-chunk-21-1.png b/man/figures/README-unnamed-chunk-21-1.png
index f5d5ea3b..40dd2644 100644
Binary files a/man/figures/README-unnamed-chunk-21-1.png and b/man/figures/README-unnamed-chunk-21-1.png differ
diff --git a/man/figures/README-unnamed-chunk-22-1.png b/man/figures/README-unnamed-chunk-22-1.png
index e96f84e0..59250c51 100644
Binary files a/man/figures/README-unnamed-chunk-22-1.png and b/man/figures/README-unnamed-chunk-22-1.png differ
diff --git a/man/figures/README-unnamed-chunk-23-1.png b/man/figures/README-unnamed-chunk-23-1.png
index b5260a34..24340f18 100644
Binary files a/man/figures/README-unnamed-chunk-23-1.png and b/man/figures/README-unnamed-chunk-23-1.png differ
diff --git a/man/figures/README-unnamed-chunk-24-1.png b/man/figures/README-unnamed-chunk-24-1.png
index e59e02c0..9ba85217 100644
Binary files a/man/figures/README-unnamed-chunk-24-1.png and b/man/figures/README-unnamed-chunk-24-1.png differ
diff --git a/man/summary.mvgam.Rd b/man/summary.mvgam.Rd
index bf37e90c..92aa1e60 100644
--- a/man/summary.mvgam.Rd
+++ b/man/summary.mvgam.Rd
@@ -21,7 +21,7 @@ Defaults to \code{TRUE} but use \code{FALSE} for a more concise summary}
\item{smooth_test}{Logical. Compute estimated degrees of freedom and approximate
p-values for smooth terms? Defaults to \code{TRUE}, but users may wish to set
-to \code{FALSE} for complex models with many smooth terms}
+to \code{FALSE} for complex models with many smooth or random effect terms}
\item{digits}{The number of significant digits for printing out the summary;
defaults to \code{2}.}
@@ -45,10 +45,12 @@ These functions take a fitted \code{mvgam} object and return various useful summ
\code{summary.mvgam} and \code{summary.mvgam_prefit} return brief summaries of the model's call, along with posterior intervals for
some of the key parameters in the model. Note that some smooths have extra penalties on the null space,
so summaries for the \code{rho} parameters may include more penalty terms than the number of smooths in
-the original model formula. Approximate p-values for smooth terms are also returned, with methods used for their
+the original model formula. Approximate p-values for smooth terms are also returned,
+with methods used for their
calculation following those used for \code{mgcv} equivalents (see \code{\link[mgcv]{summary.gam}} for details).
The Estimated Degrees of Freedom (edf) for smooth terms is computed using
-\code{edf.type = 1} as described in the documentation for \code{\link[mgcv]{jagam}}. Experiments suggest
+either \code{edf.type = 1} for models with no trend component, or \code{edf.type = 0} for models with
+trend components. These are described in the documentation for \code{\link[mgcv]{jagam}}. Experiments suggest
these p-values tend to be more conservative than those that might be returned from an equivalent
model fit with \code{\link[mgcv]{summary.gam}} using \code{method = 'REML'}
diff --git a/src/mvgam.dll b/src/mvgam.dll
index f2fde265..643fb1d5 100644
Binary files a/src/mvgam.dll and b/src/mvgam.dll differ