Longitudinal has nothing to do with it. The formula is applied to all the observed and model-implied covariance matrices (in all groups, if applicable) of observed variables, regardless of whether any of those happen to be repeated measures.
Instead of averaging only the residuals from the observed and model-implied covariance matrices, the residuals between observed and model-implied mean vectors are also summed (and the sum is divided by the number of all residuals, resulting in a mean). A variable's mean (residual) can be stanrdardized merely by dividing by the variable's SD.
Yes, this is the formula applied by Jöreskog & Sorbom in the LISREL program, and by Peter Bentler is the EQS program. You can find that formula in those software manuals (e.g., formula 14.9 of the
EQS manual) or in papers such as Hu & Bentler (
1998, Table 1). As the formula indicates, these correlation residuals are calculated by standardizing the covariance residuals, which are the raw differences between observed and predicted sample moments. So I call this the "
subtract, then standardize" formula.
Ken Bollen's (
1989)
Structural Equations with Latent Variables, often called the "SEM bible", defines SRMR using correlation residuals instead of covariance residuals. The observed and model-implied covariance matrices are each standardized, and SRMR is calculated as the average difference between correlations, so "
standardize, then subtract".
Although both formulas yield equivalent residuals in most situations, Bollen's formula ignores misspecification in (residual) variances. Because each matrix is standardized, the diagonal of both correlation matrices will always be 1, resulting in correlations residuals == 0 by definition. Such situations occur when homogeneity of (residual) variances is imposed across groups or repeated measures, such as latent curve models or strictly invariant CFAs. Interestingly, Muthén's (
2018, see formulas 2 & 3, which include mean structure) Mplus package uses the "standardize, then subtract" method for off-diagonal correlation residuals and the mean vector, but "subtract, then standardize" for the variances.