gladder function

Replica of Stata's gladder function