0

I would like to fit a functional generalized additive model (with a scalar outcome and a functional predictor) where the outcome is regressed on an integral:

\int F(X(t)) dt

By default, the "refund" package in R assumes a more flexible form

\int F(X(t), t) dt

Is there a way to constrain the function F not to depend on the t variable? I tried this by specifying the degree of freedom in the t direction to be one in the "pfr" function, but the function ignores this constraint. Here is the minimal working example to show the error I get (taken from the documentation for the "af" function):

library(refund)
data(DTI)
DTI1 <- DTI[DTI$visit==1 & DTI$case==1, ]
DTI2 <- DTI1[complete.cases(DTI1), ] 
fit1 <- pfr(pasat ~ af(cca, k=c(8,1), m=list(c(2,2), c(0,0)), basistype='te'), data=DTI2)
vis.pfr(fit1)
Aki
  • 155
  • 1
  • 2
  • 8

0 Answers0