I am running a mixed model to calculate an ICC and have managed to save the random effects and their standard errors. The code below can obtain the ICC. However I would like to obtain 95% CI for the ICC and I suspect nlcom can do this? However I do not have the usual beta coefficients from a regression model but rather the estimate and se stored as scalars. Any advice? Note that I'm also running more complex models and so the usual ICC commands are not suitable.
* Run model
mixed y || _all:R.examiner || subject:, reml
* To select var comp for examiner
_diparm lns1_1_1, f(exp(2*@)) d(2*exp(2*@))
scalar r_examiner = r(est)
* To select var comp for subject
_diparm lns2_1_1, f(exp(2*@)) d(2*exp(2*@))
scalar r_subj = r(est)
* To select var comp for error
_diparm lnsig_e, f(exp(2*@)) d(2*exp(2*@))
scalar r_error = r(est)
* Calculate ICC
scalar icc1 = r_subj/(r_subj+r_examiner+r_error)
display icc1
* Run model
mixed y || _all:R.examiner || subject:, reml
* To select var comp for examiner
_diparm lns1_1_1, f(exp(2*@)) d(2*exp(2*@))
scalar r_examiner = r(est)
* To select var comp for subject
_diparm lns2_1_1, f(exp(2*@)) d(2*exp(2*@))
scalar r_subj = r(est)
* To select var comp for error
_diparm lnsig_e, f(exp(2*@)) d(2*exp(2*@))
scalar r_error = r(est)
* Calculate ICC
scalar icc1 = r_subj/(r_subj+r_examiner+r_error)
display icc1
Comment