refunders / refund

Regression with functional data
39 stars 23 forks source link

pffr() for generalized data #115

Closed alexvolkmann closed 2 weeks ago

alexvolkmann commented 3 months ago

Hey,

there is some problem with generalized functions in pffr() when the family argument is not specified as for example "poisson" but as "poisson()". Slightly adapted example from help:

data2 <- pffrSim(scenario="all", n=200) t <- attr(data2, "yindex") s <- attr(data2, "xindex") data2$Y_obs <- I(matrix(rpois(n = 200*60, lambda = exp(c(data2$Y))),nrow = 200, ncol = 60)) m2 <- pffr(Y_obs ~ ff(X1, xind=s) + xlin + c(te(xte1, xte2)) + s(xsmoo) + c(xconst), yind=t, data=data2, family = poisson())

This becomes a problem when you e.g. want to use different link function.

Best

fabian-s commented 3 months ago

oh no...

note to self:

if (!is.null(dots$family) && dots$family == "gaulss") { needs to check whether family was provided as a string or function call...