cjvanlissa / tidySEM

55 stars 7 forks source link

Mplus - displaying STDY standardized parameter estimates with graph_SEM() #91

Closed austinj closed 6 months ago

austinj commented 6 months ago

How would I force graph_SEM() to display the STDY standardized parameter estimates from an mplus model object, instead of the unstandardized estimates? All mplus' parameter estimates live under $parameters in the mplus model object, and there are five different elements inside $parameters: unstandardized, r2, stdyx, stdy, std. I tried nulling out all the list elements except stdy, but that threw Error in *tmp*[[2]] : subscript out of bounds. I could see myself pulling the estimates out from the mplus model object's stdy element and prepping them for tidySEM using edges(), but that would be a bit clunky since I'd have to massage the formatting from the mplus model object's $parameters to make it work. Thanks for such a great package; appreciate any insight folks might have.

austinj commented 6 months ago

Easy fix, just needed to think about it. mplus.object$parameters$unstandardized <- mplus.object$parameters$stdy.standardized

cjvanlissa commented 6 months ago

Smart hack :) I don't think I ever built in support for the stdy estimates in tidySEM, and I am moving away from commercial software like Mplus so it's not a top priority either. Sorry about that!