Weights

Weights

is an option for various fitting and other functions which specifies weights to associate with data elements.

Details

  • Weights->Automatic associates weight 1 with all data elements.
  • Weights->{w1,w2,} associates weight wi with the i^(th) data element.
  • Weights->func associates weight func[xi1,xi2,,yi] with the i^(th) data element.
  • Using VarianceEstimatorFunction->(1&) and Weights->{1/Δy12,1/Δy22,}, Δyi is treated as the known uncertainty of measurement yi and parameter standard errors are effectively computed only from the weights. »

Examples

open allclose all

Basic Examples  (1)

Fit a model using equal weights:

Give explicit weights to the data points:

Compute weights from values:

Compute weights from the response values:

Scope  (2)

Use weights in a nonlinear model:

Give explicit weights to the data points:

A generalized linear model:

Logit model:

Probit model:

Weight by a function of multiple variables:

Use default equal weights:

Compute weights from the response values:

Applications  (1)

Fit a nonlinear model using measurement errors as weights:

Obtain standard errors for the parameters:

Compare to estimates with weights not assumed to be from measurement errors:

Properties & Relations  (2)

Weights impact the relative importance of data points on the fitting:

Scaling by a constant does not change the parameter estimates:

Obtain parameter estimates from a weighted linear fitting:

LeastSquares gives the equivalent result when weights are incorporated:

Introduced in 2008
 (7.0)