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
I really like the derivatives function, but I have been running into this issue.
The issue occurs whether I use ordered or unordered factors in the by-factor smooths. I have been mostly testing this with gamm, but it seems to not work for gam either.
For example:
This returns the derivative for the first level of the by factor smooth, but returns all zeros for the derivative and standard error for the next level.
If I run this in the ordered factor case to test for interactions, modobj <- gamm(y ~ s(age) +oSex + s(age,by = oSex),random=list(ID=~1) df <- derivatives(modobj,'age)
It returns the derivative for the reference smooth (s(age)), but all zeros for the derivative and standard error of the by factor smooth.
The text was updated successfully, but these errors were encountered:
I really like the derivatives function, but I have been running into this issue.
The issue occurs whether I use ordered or unordered factors in the by-factor smooths. I have been mostly testing this with
gamm
, but it seems to not work forgam
either.For example:
modobj <- gamm(y ~ s(age,by = sex),random=list(ID=~1)
df <- derivatives(modobj,'age)
This returns the derivative for the first level of the by factor smooth, but returns all zeros for the derivative and standard error for the next level.
If I run this in the ordered factor case to test for interactions,
modobj <- gamm(y ~ s(age) +oSex + s(age,by = oSex),random=list(ID=~1)
df <- derivatives(modobj,'age)
It returns the derivative for the reference smooth (
s(age)
), but all zeros for the derivative and standard error of the by factor smooth.The text was updated successfully, but these errors were encountered: