Null degrees of freedom to calculate adjusted R-square for a svyglm object I want to calculate adjusted $R^2$ for a svyglm model. To account for a complex cluster sampling design, a set of 80 replicate weights is supplied as part of the dataset. Suppose m1 is my model object and des is the survey design object. Then, following this answer I calculate $R^2$ as follows:
1 - m1$deviance/m1$null.deviance

Now, to calculate adjusted $R^2$, I use the following formula:
$$
1 - (1 - R^2)\frac{\mathrm{df}_0}{\mathrm{df}_1},
$$
where $\mathrm{df}_0$ is the number of degrees of freedom in the null model and $\mathrm{df}_1$ is the number of degrees of freedom in my fitted model. To get the latter, I use simply m1$df.residual. To get the former, shall I use m1$df.null or degf(des)? The function poliscidata::fit.svyglm uses the m1$df.null, but according to this note, the design degrees of freedom should be equal to the number of replicate weights less 1 in my case.

The formula for adjusted $R^2$ isn't designed for cluster-sampled data, and doesn't apply.  However, if you do use it you should use degf(des) rather than m1$df.null, because the former is what m1$df.residual is based on.
If you want degrees of freedom to correct for overfitting, as in adjusted $R^2$ you need something like the design-based AIC or Andrew Holbrook's version of Efron's covariance penalty
