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
Originally posted by TSeuH December 6, 2023
Hello,
I have been trying to get the first derivatives for each individual fit from the following model:
gam.smooth <- gam(TV ~ groupID +
s(time, by = groupID) +
s(time, animalID, bs = "fs", m = 1),
data = dataTV, method = "REML")
fdSmooth <- derivatives(gam.smooth, n = 1000, term = "s(time)", partial_match = TRUE)
I see a column "fs_var" in fdSmooth, and I was assuming it would contain "animalID", just like by_var contains "groupID". I thought I could get the first derivative for each animalID, but with this code, I only get the first derivative for each groupID, regardless of the animalID.
Would it be possible to have the derivatives by animalID without changing the GAM?
Thank you.
The text was updated successfully, but these errors were encountered:
Discussed in #242
Originally posted by TSeuH December 6, 2023
Hello,
I have been trying to get the first derivatives for each individual fit from the following model:
gam.smooth <- gam(TV ~ groupID +
s(time, by = groupID) +
s(time, animalID, bs = "fs", m = 1),
data = dataTV, method = "REML")
fdSmooth <- derivatives(gam.smooth, n = 1000, term = "s(time)", partial_match = TRUE)
I see a column "fs_var" in fdSmooth, and I was assuming it would contain "animalID", just like by_var contains "groupID". I thought I could get the first derivative for each animalID, but with this code, I only get the first derivative for each groupID, regardless of the animalID.
Would it be possible to have the derivatives by animalID without changing the GAM?
Thank you.
The text was updated successfully, but these errors were encountered: