Stata: Data Analysis and Statistical Software
   >> Home >> Resources & support >> Users Group meetings >> 5th UK meeting

Replaying estimation results

  • replay() function simplifies programming an estimation command to replay results
  • replay() returns 1 if the first non-blank character in `0' is a comma or if `0' is empty

    Note:option set 1 are options affecting how results are displayed. option set 2 are options affecting the estimation results themselves.
        program define mycmd6, eclass
            local options "option set 1"
            if replay() {
                if "`e(cmd)'" != "mycmd6" {
                    error 301
                }
                syntax [, `options']
            }
            else {
                syntax varlist [if] [in] [, `options' option set 2]
                   ...code performing estimation, setting estimation results, etc...
                estimates local cmd "mycmd6"
            }
        
                                            /* code to display or redisplay results */
            ...code omitted that outputs header table above coefficients...
            estimates display
        end
Bookmark and Share 
Meetings
Stata Conference
User Group meetings
Proceedings
Like us on Facebook Follow us on Twitter Follow us on LinkedIn
Follow us
© Copyright 1996–2012 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index   |   View mobile site