以下是两者比较的程序:
webuse catheter,clear
stset time infect
/*Two-level random-intercept weibull survival model */
mestreg age female || patient:, distribution(weibull)
streg age female, dist(weibull) frailty(gamma)
mestreg age female || patient:, distribution(weibull) nolrtest
streg age female, dist(weibull) frailty(gamma) nolrtest
/*Two-level random-intercept lnormal survival model */
mestreg age female || patient:, distribution(weibull) nohr
mestreg age female || patient:, distribution(lnormal)
streg age female, dist(lnormal) frailty(gamma)
streg age female, dist(lnormal) frailty(gamma) shared(patient)
streg age female, dist(lnormal) frailty(invgauss) shared(patient)
/*Two-level random-intercept Weibull survival model in the accelerated failure-time metric */
mestreg age female || patient:, distribution(weibull) time
streg age female, dist(weibull) frailty(gamma) time
mestreg age female || patient:, distribution(weibull) time nolrtest
streg age female, dist(weibull) frailty(gamma) time nolrtest