Error "Can't open file ST_634_000008.tmp"
Posted: Sat Nov 15, 2025 4:19 pm
Hi everyone,
I'm trying to run a MAIHDA model in Stata and keep getting the error code in mlwin "Can't open file ST_634_01000008.tmp".
I'm confused, because I'm doing sensitivity analyses for a submitted paper and my code is the same as it was when I did the main analysis, with adapted variables of course. Back then there were no errors at all.
This is the part of the code where the error occurs. The first 10 lines run perfectly fine, after that mlwin opens and I get the error. When I close mlwin it says in Stata that I should run it without the nopause command, but if I do that, Stata says "option rename not allowed".
Thank you so much in advance!
I'm trying to run a MAIHDA model in Stata and keep getting the error code in mlwin "Can't open file ST_634_01000008.tmp".
I'm confused, because I'm doing sensitivity analyses for a submitted paper and my code is the same as it was when I did the main analysis, with adapted variables of course. Back then there were no errors at all.
This is the part of the code where the error occurs. The first 10 lines run perfectly fine, after that mlwin opens and I get the error. When I close mlwin it says in Stata that I should run it without the nopause command, but if I do that, Stata says "option rename not allowed".
Code: Select all
* Load the data
use "intersections_age_24", clear
* Fit model 1 in manuscript by PQL2
runmlwin proportion cons, ///
level2(stratum: cons) ///
level1(stratum:) ///
discrete(distribution(binomial) link(logit) denominator(denominator) pql2) ///
rigls ///
nopause
* Fit model 1 in manuscript by MCMC
runmlwin proportion cons, ///
level2(stratum: cons, residuals(u, savechains("m1u.dta", replace))) ///
level1(stratum:) ///
discrete(distribution(binomial) link(logit) denominator(denominator)) ///
mcmc(burnin(5000) chain(50000) thinning(50) ///
savechains("m1b.dta", replace)) initsprevious ///
nopause
rename u0 m1u
drop u0se
* Present the regression coefficients as odds ratios
runmlwin, or
* Calculate the ICC from the parameter point estimates
scalar m1sigma2u = [RP2]var(cons)
scalar m1sigma2e = _pi^2/3
display "ICC = " %9.3f m1sigma2u/(m1sigma2u + m1sigma2e)
* Calculate the ICC from the chains
use "m1b.dta", clear
rename RP2_var_cons_ sigma2u
generate sigma2e = _pi^2/3
generate icc = sigma2u/(sigma2u + sigma2e)
mcmcsum icc, variables