Suppose I have the following data:
data = {{{4.05, -5.06579}, ErrorBar[0.180393]},
{{ 4.1, -4.93148}, ErrorBar[0.191881]},
{{4.15, -5.14983}, ErrorBar[0.201101]}}
and I fit it to a constant with weights that are 1/the error bar as follows:
fit = LinearModelFit[ data[[All,1]], 1, t, Weights -> 1/( Sequence@@@data[[All,2]] )^2 ]
Then I know I can recover the actual data points via fit["Data"]
. Is it possible to recover the weights used in the fit? I have searched through the documentation extensively and none of the options of FittedModel
seem to produce what I'm looking for (and the weights don't seem to be stored in the same way when I look at FullForm@fit
).
I'd like to accomplish this because then my analysis can be independent of the data set -- I could just pass around the FittedModel
output objects themselves.
data
, can't you just recalculate the weights in the same way? $\endgroup$data
. $\endgroup$Weights
together withVarianceEstimatorFunction
: How to | Fit Models with Measurement Errors. $\endgroup$