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:

Wolfram Research (2008), Weights, Wolfram Language function, https://reference.wolfram.com/language/ref/Weights.html.

Text

Wolfram Research (2008), Weights, Wolfram Language function, https://reference.wolfram.com/language/ref/Weights.html.

CMS

Wolfram Language. 2008. "Weights." Wolfram Language & System Documentation Center. Wolfram Research. https://reference.wolfram.com/language/ref/Weights.html.

APA

Wolfram Language. (2008). Weights. Wolfram Language & System Documentation Center. Retrieved from https://reference.wolfram.com/language/ref/Weights.html

BibTeX

@misc{reference.wolfram_2024_weights, author="Wolfram Research", title="{Weights}", year="2008", howpublished="\url{https://reference.wolfram.com/language/ref/Weights.html}", note=[Accessed: 22-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_weights, organization={Wolfram Research}, title={Weights}, year={2008}, url={https://reference.wolfram.com/language/ref/Weights.html}, note=[Accessed: 22-November-2024 ]}