Ateljevich, Eli@DWR
2014-Apr-18 02:08 UTC
[R] Mixtures of smooths on the same covariate in mgcv?
Hi all, I have observations that mix together contributions from several smooth functions of time. These smooths represent fluxes on a graph. Some of the observations are centered on the edges of the graph, and directly measure one flux. The others measurements are centered on the nodes of the graph and these rows of the problem relate sources and sinks on the nodes to the sum of surrounding fluxes. So they mix together multiple smooths. Is there a straightforward way to handle combinations of smooths on the same covariate in a tool such as mgcv? I have come up with some crude ideas like defining time1, time2, time3 and then combine them with indicator variables: y ~I(1)s(time1) + I(2)s(time2) + .... Is this safe? Is there a better way to handle different smooths over the same covariate? Some trick with factors? Thanks much! [[alternative HTML version deleted]]