ftrend function

Fit a floating trend to a factor in generalized linear model