fitting a model to data with correlated noise