Open 3rd3 opened 2 months ago
This is because you are being too specific about the smooths that you want to difference. The function only works for factor by
smooths (at the moment), so there is no need to specify the the specific smooth:level combination. All you need is:
difference_smooths(fit, select = "te(X,Y)")
for your example.
I should try to catch this issue and do something more user-friendly than the current vctrs error.
As for qgam()
models; while I haven't tried it, I don't recall anything specific that would stop difference_smooths()
from working unless the model you fitted was for multiple $\tau$ values - qgam()
models inherit from class "gam"
so I would expect difference_smooths()
to just work. Reality might be a bit different though, so if it doesn't work let me know and I'll make it work.
Right now, no; I haven't implemented simultaneous intervals for differences, but I could do this.
Description:
I encountered an issue while trying to run a significance test between two fitted surfaces using
difference_smooths()
. The test involves a GAM fit using a simple factor-by interaction smooth (Z ~ s(X, Y, bs = "tp", by = group)
) with two groups. The error suggests a size mismatch in thevec_rbind()
function from thevctrs
package, likely during the call todplyr::bind_rows()
.Additional question: Are there other ways of running such a significance test? I would also like to try
qgam
.Code to Reproduce:
Error Message:
Additionally, the following warning messages appear:
Session Info:
Thank you for your attention!