fit discrete difference equation to model dynamics