trend function

Estimate trend component