You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if (base::grepl(pattern=interaction.smooth, old.covariates, fixed=T)) {
Hi there. The plotGAM function stops execution if the covariate is not a smooth term. It doesn't allow tensor product terms (mgcv::te) or normal terms. But when I comment out those lines of code that check for s(, the function works perfectly well. It seems like you would want the plotting function to support a broader class of functions that can be used in GAMs, since you might have a GAM model with both smooth terms and tensor product terms and want to visualize the covariates together.
The plotGAM function includes a ggtitle that would have to be updated, and I plan work on that and submit a pull request, but I wanted to open the issue first to make sure.
voxel/R/plotGAM.R
Line 75 in bc8c6d3
Hi there. The
plotGAM
function stops execution if the covariate is not a smooth term. It doesn't allow tensor product terms (mgcv::te
) or normal terms. But when I comment out those lines of code that check fors(
, the function works perfectly well. It seems like you would want the plotting function to support a broader class of functions that can be used in GAMs, since you might have a GAM model with both smooth terms and tensor product terms and want to visualize the covariates together.The
plotGAM
function includes aggtitle
that would have to be updated, and I plan work on that and submit a pull request, but I wanted to open the issue first to make sure.Minimal example:
If you comment out the code I highlighted at the top, the bottom 2 plot calls would work fine (albeit with a misleading title)
The text was updated successfully, but these errors were encountered: