This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Weights

Weights
is an option for various fitting and other functions which specifies weights to associate with data elements.
  • Weights associates weight with the i^(th) data element.
  • Weights->func associates weight with the i^(th) data element.
Fit a model using equal weights:
Give explicit weights to the data points:
Compute weights from values:
Compute weights from the response values:
Fit a model using equal weights:
In[1]:=
Click for copyable input
Out[1]=
Give explicit weights to the data points:
In[2]:=
Click for copyable input
Out[2]=
Compute weights from values:
In[3]:=
Click for copyable input
Out[3]=
Compute weights from the response values:
In[4]:=
Click for copyable input
Out[4]=
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:
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:
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:
New in 7