Cost function issues and estimation