The parmby command in Stata:
The parmby command runs any Stata command that produces parameter estimates, then formats and saves the results in a Stata dataset, the Results window, and/or the log file. It saves the results as one observation per parameter in a Stata dataset. You can format the results for printing and publication, e.g. rounding estimates to 2 decimal places. Parmby uses the parmest command and has all the abilities of parmest and more. Parmby does not come with the Stata software but is available at CPC both on unix and the Windows platforms. If you are not on the CPC system, you can download the latest parmby.ado (and parmest.ado) file by typing at a Stata command line: ssc desc parmest You need to have an active connection to the internet to do this. If you have a copy of parmby and parmest but are unsure how recently it was downloaded, download it again and "force" the install to make sure you have the latest version. Here's an example showing how to format and save the results of an svyprobit command:
use "t:\statatut\examfac2.dta"
** save results to an external data set named results1.dta **
parmby "svyprobit age factype authorit urbrur femster", saving("results1.dta", replace)
** redisplay some of the results nicely formatted **
parmby "svyreg age factype authorit urbrur pill inject IUCD malecond diaph foam femster", ///
list(parm est min95 max95 p) format(est stderr p %8.2f p %8.1e)
NOTE: parmby"command", saving("results1.dta") puts the file results1.dta in the current subdirectory that Stata is working in. If you want to save it to another directory, you can specify that inside the parentheses.
parmby "svyprobit age factype authorit urbrur femster", saving("../data/results1.dta",replace)
Type help parmby for more information. Questions or comments? If you are affiliated with the Carolina Population Center, send them to Phil Bardsley.
|

