After reading the documentation, it's still unclear for me what VarianceEstimatorFunction does when fed with two arguments:

NonlinearModelFit[RandomReal[{0, 10}, {10, 2}], 
 Exp[a x] + b, {a, b} , x, 
 VarianceEstimatorFunction -> (Tan[#1] Cot[#2] &), 
 Weights -> Abs@Sin[Range[10]]]

Does the first argument correspond to a residual at one single data point while the second argument is the weight of that point, and total variance is the sum? How does that reconcile with the following statement from documentation:

With VarianceEstimatorFunction->(1&) and Weights->{1/Subscript[[CapitalDelta]y, 1]^2,1/Subscript[[CapitalDelta]y, 2]^2,[Ellipsis]}, Subscript[[CapitalDelta]y, i] is treated as the known uncertainty of measurement Subscript[y, i] and parameter standard errors are effectively computed only from the weights. »

One would assume that (1 &) should ignore the weights. How about (5 &)?

  • $\begingroup$ First argument is the list of residuals; second argument is the list of weights. This is stated in the documentation. Using 5& would just scale all of the residuals up by five times. $\endgroup$ – Oleksandr R. Apr 11 '16 at 0:55
  • $\begingroup$ Wouldn't 5 # & be the scaling-up-five-times? $\endgroup$ – Al Guy Apr 11 '16 at 1:49
  • 1
    $\begingroup$ VarianceEstimatorFunction is the function that estimates the variance scale; it is supposed to be a scalar. If takes a value of 5, the scale is inflated fivefold over what it would be if it took a value of 1. This makes the residuals effectively five times smaller (not larger as I said above). It is not a direct transformation of the residuals, though. At least I think this is correct. $\endgroup$ – Oleksandr R. Apr 11 '16 at 1:56

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.