Hi Jasper,
Thanks so much for the reply. I believe you are very close, because theta is indeed the parameter I am interested in. My only concern is that this function returns me a single value, the estimate, for each indicator. I am wondering if maybe I can get estimates for each observation used - Just as I did for the factor scores.
See this mention in Kim et al., 2021's Publication on Internalizing Dimensions and All-Cause Mortality :
"To model the transdiagnostic internalizing factor, we used confirmatory
factor analysis (CFA), including four indicators (MDD, GAD, panic
disorder, and neuroticism) assessed at MIDUS 1. After modeling internalizing, we saved the factor scores to include them in the main Cox regression model."
"In order to compare the predictive validity of internalizing versus
disorder‐unique variance, we parameterized an explicit residual variance
factor for each of the three internalizing disorders and neuroticism
(i.e., the unique variance remaining in each indicator after the common
variance is accounted for by the latent internalizing variable). We then
saved the factor scores from transdiagnostic internalizing and the four
construct residual factors, and regressed survival time on both
internalizing and the residual factor scores simultaneously."
This is what I am trying to accomplish. Just as I used that for loop that gives me factor score estimates for each observation, I wish to do the same with residual variances for use in regression with an outside variable. Perhaps I can insert your suggested function in my for loop? Let me know your thoughts.
-Zach