Skip to content

Commit d422646

Browse files
author
Nicholas Clark
committed
update function now respects dropped observaiton intercepts
1 parent b80bc19 commit d422646

File tree

3 files changed

+7
-0
lines changed

3 files changed

+7
-0
lines changed

R/mvgam.R

+3
Original file line numberDiff line numberDiff line change
@@ -1630,6 +1630,9 @@ mvgam = function(formula,
16301630
}
16311631

16321632
vectorised$model_file <- readLines(textConnection(vectorised$model_file), n = -1)
1633+
attr(ss_gam, 'drop_obs_intercept') <- TRUE
1634+
} else {
1635+
attr(ss_gam, 'drop_obs_intercept') <- FALSE
16331636
}
16341637

16351638
# Remaining model file updates for any GP terms

R/update.mvgam.R

+4
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,10 @@ update.mvgam = function(object, formula,
4040

4141
if(missing(formula)){
4242
formula <- object$call
43+
44+
if(attr(object$mgcv_model, 'drop_obs_intercept')){
45+
formula <- update(formula, ~ . -1)
46+
}
4347
}
4448

4549
if(missing(trend_formula)){

src/mvgam.dll

0 Bytes
Binary file not shown.

0 commit comments

Comments
 (0)