Weighted average of a set of slopes with different goodness of fit

vendredi 11 juillet 2014

Hi there, I have a bit of a confusing question, but I'll try to be as clear as I can in asking it.



I have a set of linear fits for four different sets of data. Basically, I have three sets of data, with sample sizes N1 = 5, N2 = 7, N3 = 5 respectively. I have plotted these data with respect to a common x-axis. Then, I have found the linear fit for each data set, giving me a line with a slope, so 3 slopes total (m1, m2, m3) with three errors in slope as well (m'1, m'2, m'3). Each of the linear fits also has a goodness of fit associated with it (0.79, 0.99, 0.89) using the R-squared value.



Here's my question. I need to solve for the average slope and average error in slope. I feel like a simple average and standard deviation isn't indicative of the real average, because the linear fits are not all equally "well-fit". Is there a way to weight the slopes m1, m2, m3 according to their R^2 values so that I can calculate m_avg using a weighted mean? Or is the average of the error in the slope enough? Should the sample sizes Ni come into it at all?



Any advice would be greatly appreciated! Thanks :)





0 commentaires:

Enregistrer un commentaire