Skip to main content
replaced http://stats.stackexchange.com/ with https://stats.stackexchange.com/
Source Link

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy_i^2$ values on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This related questionThis related question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy_i^2$ values on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This related question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy_i^2$ values on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This related question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

square the errors for the weight matrix
Source Link

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy$$1/dy_i^2$ values on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This related question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy$ on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This related question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy_i^2$ values on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This related question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

fix typo
Source Link

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy$ on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This relaterelated question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy$ on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This relate question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

I am doing a weighted linear least squares fit to N measured values of the form $(x, y, dy)$, where $x$ is the independent variable, $y$ is the independent variable, and $dy$ is the error estimates for the independent variable. Following the linked wikipedia page, I am able to get the two fit parameters but not yet able to get the parameter errors. The article lists that the variance-covariance matrix for the parameters, $M^\beta$, can be calculated using $$M^\beta = (X^T W X)^{-1} W M W^T X(X^T W^T X)^{-1}\,,$$ where $X$ is an $n \times 2$ matrix of the $x$-values and ones, $W$ is an $n \times n$ diagonal matrix with $1/dy$ on the diagonal, and $M$ is the variance-covariance matrix for the observations. How would I calculate $M$ from my $(x, y, dy)$ data?

This related question and this post use $$M_{jk} = \frac{1}{N-1} \sum_{i=1}^{N}(x_{ij} - \bar{x_j})(x_{ik} - \bar{x_k})$$ but should $dy$ somehow affect this? This is straightforward to calculate but I am not sure which index the $x$ or $y$ values should take (with this only being a 2$\times$2 symmetric matrix it only affects the diagonal).

The article mentions a major simplification when $W = M^{-1}$ but I am not sure if this is the case for my data. Is there a simple way to know this is the true without calculating $M$?

Tweeted twitter.com/StackStats/status/814284425710157829
add further information
Source Link
Loading
explain the varables
Source Link
Loading
Source Link
Loading