I'm learning about sampling statistics and I have a question that doesn't seem like it has been addressed in my readings, which makes me wonder if I have a core confusion.
Suppose that you have model that is supposed to model real-life data. You take a sample of that model, and compare it to the observed data. You want to use $r^2$ as a measure of goodness of fit to determine how much of the variation of the data is explained by the model (in contrast to some null model). It seems like there would then be a "population $r^2$" and a "sample $r^2$" where the population statistic is derived by some limiting procedure and is the "true value of the amount of the variation explained by the model" and the sample $r^2$ is what you calculate based on the data and serves as an estimator for the true value.
However, assuming the above is right, there should be some kind of error analysis procedure and in particular a formula for the standard error that I have been entirely unable to find online. I know how to calculate the standard error for sample proportions and sample means and how to make confidence intervals and infer significance for those kinds of things, but $r^2$ doesn't seem to be one of those kinds of things.
How do I calculate error bars and do significance analysis for an $r^2$ goodness of fit statistic?