Announcement

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

  • robvar to excel

    Any idea on how I can get the results of robvar command to excel?

  • #2
    To export to MS Excel I would imagine that you could use putexcel or table with the r-class results documented in the help for robvar.

    Comment


    • #3
      Originally posted by Nick Cox View Post
      To export to MS Excel I would imagine that you could use putexcel or table with the r-class results documented in the help for robvar.
      I tried to put this together but not successful with it. I only get labels but no figures.

      Code:
      putexcel set "robvar.xlsx", sheet(Table1) replace 
      local row = 2     
      foreach x in efficient esteem  {
        local var_lab : variable label `x' 
        quietly robvar `x' if state==1 & period==0, by(progexp) 
        putexcel A`row'=("`var_lab'")   ///
                        B`row'=(r(mu_1)) C`row'=(r(sd_1)) D`row'=(r(N_1))  ///
                        E`row'=(r(mu_1)) F`row'=(r(sd_1)) G`row'=(r(N_1))  //
        local row `++row'
      }
      Dataset attached. samplerobvar.xlsx

      Thanks

      Comment

      Working...
      X