Timeline for Improving fit by adding weights
Current License: CC BY-SA 4.0
16 events
when toggle format | what | by | license | comment | |
---|---|---|---|---|---|
Jul 7, 2021 at 16:24 | comment | added | JimB | Thanks! (Although I'm not sure how to interpret that. Either it's a compliment or a sarcastic comment which being sarcastic myself, I do appreciate.) | |
Jul 7, 2021 at 16:18 | comment | added | NoOne | A communication with you was like attending a course on statistics! Many thanks! | |
Jul 7, 2021 at 16:14 | comment | added | JimB | The weights should be proportional to the standard deviation of the observation (whether that is a single observation or the mean of several observations). If all of the sample points have the same number of observations used to calculate the mean, then it doesn't matter. (Note that all standard errors are standard deviations for some summary statistic.) While the estimates and estimated precision of the parameters will be fine, if the objective is to find the precision of a single prediction at some value of $t$, then explicit accounting for the means is necessary. That would be a new q. | |
Jul 7, 2021 at 16:02 | comment | added | NoOne | Just a final question: As my data points are mean values, do you think it's better to define $w$ in your code as the given standard deviations in the question as you have already done or to define $w$ as the standard error which can be obtained by dividing the standard deviations by the square root of sample size? | |
Jul 7, 2021 at 16:00 | history | edited | JimB | CC BY-SA 4.0 |
Fixed error noted by OP: changed x_i to t_i.
|
Jul 7, 2021 at 15:59 | comment | added | JimB | Sorry, I missed your initial comment. Yes, that is my mistake about using $x_i$ instead of $t_i$. I'll fix that. Thanks. | |
Jul 7, 2021 at 15:56 | comment | added | JimB | Not exactly. To be blunt: the fit is only "visually" worse to someone who doesn't understand the effect of weights. Note that the "worsening" of the visual fit is generally at the points where the standard deviation is higher. And the fit is "visually better" for the points with more weight (i.e., smaller standard deviations). | |
Jul 7, 2021 at 15:52 | comment | added | NoOne | Thanks for your reply. So, your result demonstrates that although "visually" the fit becomes worse when we add weights, but in fact, the estimation of parameters become better when we add weights? | |
Jul 7, 2021 at 15:50 | vote | accept | NoOne | ||
Jul 7, 2021 at 15:50 | vote | accept | NoOne | ||
Jul 7, 2021 at 15:50 | |||||
Jul 7, 2021 at 15:36 | comment | added | JimB | Sometimes when the weights are the known standard deviations, then one can write $\epsilon_i \sim N(0,1)$ rather than $\epsilon_i \sim N(0,\sigma^2)$. | |
Jul 7, 2021 at 15:34 | comment | added | JimB |
This list of $w_i$ values is defined in code (as w ) right after data is defined and used with NonlinearModelFit function for both the original data and the simulated data with Weights -> 1/w^2 . Also the $w_i$ are known coefficients that you supplied.
|
|
Jul 7, 2021 at 8:58 | comment | added | NoOne | And also, where is this $w_i$ used in your code? | |
Jul 7, 2021 at 8:40 | comment | added | NoOne | Another question: In your model, $\epsilon_i$, is the error and $w_i$ is a coefficient. But this $w_i$ is not the $w$ in your code, which is the standard deviation. Am I correct? Because I found notation confusing. | |
Jul 7, 2021 at 8:20 | comment | added | NoOne | Many thanks for your detailed answered! Please give me time to understand it. Just a first question: do you mean $t_i$ in the line under "Consider the following model", where you have written instead $x_i$? | |
Jul 7, 2021 at 3:33 | history | answered | JimB | CC BY-SA 4.0 |