Suppose that I have a data
and a statistical model that is not the result of fitting, but has a different origin. For example, I have a list of measurements and a theoretical model whose predicting accuracy I want to assess.
Is there a simple way to obtain all the properties of a FittedModel
object, but from my theoretical model?
For example, suppose that
mt=Table[{i,1+i+RandomReal[]},{i,5}]
yields mt={{1,2.56508},{2,3.58291},{3,4.8005},{4,5.24265},{5,6.38087}}
If I call
LinearModelFit[mt,x,x]
I get
And I can then get R$^2$ for the adjusted model:
%["RSquared"]
which gives $0.9851$.
But I know the theoretical model is $1.5+x$. Can I have the power of a FittedModel (residuals, ANOVA, RSquared, etc.) for my non-fitted model?
FullForm[LinearModelFit[mt,x,x]]
from your example above then the internal structure seems reasonably simple and understandable. What happens if you carefully build aFittedModel
using that structure as an example, not by doing a fit but by substituting your theoretical model in that and then you query that constructedFittedModel
for residuals, ANOVA, etc? Can you do this on test cases where you know what the calculations should show to verify that this is being done correctly? $\endgroup$