Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Using -estat bootstrap- with -parmby-

From   Roger Newson <>
To   "" <>
Subject   Re: st: Using -estat bootstrap- with -parmby-
Date   Wed, 13 Apr 2011 18:21:45 +0100

Graeme should probably use -parmest- instead of -parmby-, because -parmby- is designed to call estimation commands, and -estat bootstrap- is not an estimation command. The -parmest- command extracts an output dataset (or resultsset) from the current set of estimation results in memory.

If Graeme wants to view the bias-corrected confidence interval using -parmest-, then the solution is to use the -erows()- option of -parmest-, which creates new variables in the -parmest- output dataset containing the rows of a matrix estimation result (such as the bootstrap confidence interval). Instead of the -parmby- command, Graeme should probably type

parmest, erow(ci_bca) rename(er_1_1 bcamin95 er_1_2 bcamax95) list(parm estimate min95 max95 bcamin95 bcamax95 p ,clean noobs)

This -parmest- command uses the -erows()- option to extract the rows of the matrix -e(ci_bca)- into 2 variables in the output dataset, whose names are -er_1_1- and -er_1_2-, containing, respectively, the lower and upper BCa confidence limits. These variables are renamed (using the -rename()- option of -parmest-) to -bcamin95- and -bcamax95-, respectively, and are displayed using the -list()- option.

See the on-line help for -parmest- for more details. In particular, if you type

help parmest_resultssets

then you will see a list of all the variables that -parmest- can create in its output dataset.

I hope this helps.

Best wishes


Roger B Newson BSc MSc DPhil
Lecturer in Medical Statistics
Respiratory Epidemiology and Public Health Group
National Heart and Lung Institute
Imperial College London
Royal Brompton Campus
Room 33, Emmanuel Kaye Building
1B Manresa Road
London SW3 6LR
Tel: +44 (0)20 7352 8121 ext 3381
Fax: +44 (0)20 7351 8322
Web page:
Departmental Web page:

Opinions expressed are those of the author, not of the institution.

On 13/04/2011 16:35, Maclennan, Graeme S. wrote:
Statalist, I would like to use -parmest- from SSC to store estimates of intraclass correlation coefficients (ICCs)  and the bias-corrected and accelerated (BCa) confidence interval (CI) to create a large table (I will apply use -saving- option and concatenate when I get this problem sorted).  To get at the BCa CI I need to run -estat bootstrap, bca- after -loneway-.  All fine so far, but when I use -parmby- as below it seems to pick up the normal CI, not the Bca CI, even though the table that is produced in the results viewer is the correct table. I have made up an example using the auto.dta dataset to highlight this.  Am I doing something silly, or missing something obvious?

sysuse auto, clear
split make
bootstrap ICC=r(rho), cluster(make1) bca idcluster(newmake1) reps(50) seed(1):  loneway price newmake1
estat bootstrap, all
parmby "estat bootstrap, bca", list(parm  estimate min95 max95 p ,clean noobs)

The University of Aberdeen is a charity registered in Scotland, No SC013683.

*   For searches and help try:
*   For searches and help try:

© Copyright 1996–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index