apaWLS(DataMat, WeightVec)
Excel
=apaWLS(DataMat, WeightVec)Result
Applies a weight vector to a data matrix in order to perform weighted least squares (WLS) regression, i.e. multiplies each row by 1/sqrt of its weight. The weights are therefore interpreted as relative error variances.
Syntax
DataMat: r x c data matrix
WeightVec: r x 1 vector of observation weights
Algorithm
Remarks
Weighted least squares can be expressed as ordinary least squares with transformed variables…
