# How the total pseudo R2 is calculated with the "dissmfac" function in TraMineR?

I am using the discrepancy analysis in TraMineR. I performed univariate analysis with "dissassoc" to measure the effect of each variable. Then, I did a multi-factors analysis using "dissmfac" to assess the effect of all the variables. I didn't understand how the total Pseudo R2 is calculated in the multi-factor analysis?

By default dissmfac square the distance matrix before computing the Pseudo-R2, whereas it is not the case for dissassoc. This is to be consistent with previous literature on the methodology behind dissmfac. The dissmfacw function does not square the distance matrix by default. In any case, you can change this behavior by using the argument squared=FALSE in all the above-mentioned functions.