Announcement

Collapse
No announcement yet.
X
  • Filter
  • Time
  • Show
Clear All
new posts

  • Save labels instead of variable names using outreg2

    Hi,

    I am running the following code:
    Code:
    use http://www.stata-press.com/data/r13/ibm, clear
    
    tsset t
    
    generate ibmadj = ibm - irx
    generate spxadj = spx - irx
    
    local dep ibmadj
    local indep spxadj irx
    
    quietly : newey `dep' `indep', lag(3) force
    outreg2 using "Table1", replace dta dec(2)  tstat
    
    use "Table1_dta.dta", clear
    export excel using Need_help.xls , sheet("Table1")
    I would like to save the variable label instead of the variable name in the file "Need_help.xls". How can I do that? Thanks!


  • #2
    First, make sure your variables have a label. Second, add the "label" option to the outreg2 command (read the help file).

    Comment

    Working...
    X