I’m running many statistical models (in Mplus) and decided to do so from Stata (with -runmplus-). I’m struggling with replicating what I would do in R: collecting a selected part of the results into a new data frame.
For each of the many models, I want to collect `r(WaldTest_P)' and put its value along with an identifier into a frame.
I can't use Stata's -table- or similar commands, since I want to manipulate the resulting data frame with R and R Markdown.
For each of the many models, I want to collect `r(WaldTest_P)' and put its value along with an identifier into a frame.
Code:
// 1. and 2. are solved: // 1. I create an empty frame in Stata, called "Wald_tests" frame create Wald_tests // 2. I repeatedly run specific models, each of which gives me a value for `r(WaldTest_P)' // [code hidden] // --- Then I'm stuck. I would like to do this: --- // 3. Add a new row to the frame Wald_tests, one column contains the value for `r(WaldTest_P)', // another contains an identifyer for that specific value, e.g. with "`Wald_mod`i'_item`j''" // 4. Do 2 and 3 for each of the many models/tests // 5. Then export the frame as a Stata data file, like this: frame Wald_tests: save "Wald_tests.dta"

Comment