Can specific residuals be compared in multigroup analysis using Lavaan in R? Is there a way to statistically compare r-squared across 2 groups using nested models in multigroup analysis? I know how to use lavaan to test various other parameters across groups (e.g. regression coefficients, intercepts, variances...etc), but I can't find documentation for how to compare R-squared. 
Here is an example of what I mean:
HS.model <-  'visual  =~ x1 + x2 + x3
              textual =~ x4 + x5 + x6
              speed   =~ x7 + x8 + x9 
              visual + textual + speed ~ grade
              textual + speed ~ visual''
fit <- cfa(HS.model, data=HolzingerSwineford1939, group="sex")
summary(fit, fit.measures=TRUE, rsquare=TRUE)

This produces (among other things) the following R-squared statistics:
R-Square Group 1:

x1                0.519
x2                0.110
x3                0.375
x4                0.705
x5                0.729
x6                0.662
x7                0.458
x8                0.668
x9                0.266
visual            0.057
textual           0.217
speed             0.194

R-Square Group 2:

x1                0.669
x2                0.266
x3                0.304
x4                0.763
x5                0.721
x6                0.731
x7                0.320
x8                0.495
x9                0.515
visual            0.057
textual           0.258
speed             0.393

If I wanted to determine if "grade" and "vision" (predictors in the example) accounted for significantly more variability in speed for boys (.194) than girls (.393), how would I do that? 
 A: The title of your post initially made me think you were interested in comparing residual variances of observed variables. This could be easily accomplished by using the strict = TRUE option of the measurementInvariance command in the semTools package, like so:
fit.invariance<-measurementInvariance(HS.model, data = HolzingerSwineford1939, strict = TRUE, group="sex").

However, the end of your post makes it clear that instead of at the observed level, you are interested in comparing residual variability at the structural level. Simply put, does your structural model fit better for boys or girls, or equally well in both?
I am not aware of a way to constrain R2 values to equality per se (it sounds like Jeremy Miles might). That being said, constraining all latent regression pathways to equality between groups, and then comparing that solution to a model in which they are freely estimated between groups should functionally give you the information you are looking for. If the nested-model comparison rejected the model in which all paths were constrained to equality, by definition, that suggests that your modeled structural relations explain different patterns of latent variability. For example, if your model was a pretty accurate depiction of this process for boys, but completely inaccurate for girls, you would expect much stronger regression coefficients for boys, and weaker ones for girls; the test of constraining all regressive pathways to equality between groups would detect this difference. 
However, it's possible that your model could account for the same amount of variability for boys and girls, but do so through different structural relationships. You therefore should probably follow up by constraining particular pathways to equality (instead of all of them) to see where the model substantively differs for boys and girls.
