Announcement

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

  • Tables Esttab, estout for cvlasso

    Dear all,

    I am running a cvlasso using sjlog in order to keep track of my commands with a log, but now I am unable to get the labels of the variables. In addition, since some of the variables come after their interaction, c. Variable1#c. Variable2, their names are somehow titled not appearing, well, say something like
    c. Variab~1#c. Variab~2, c.Variab~1#c.Variable~3 and so one

    Usually, I use esttab, estout and their relative option commands for table creation. So, I would like to ask you what the alternatives are to getting nice publishing tables similar to esttab, estout here in order to get tables with Lasso and Post-est OLS coefficients for each model I run, with the selected variables named by their label. Or, to put it another way, are esttab and estout compatible with cvlasso and lasso2, and how do you add them to the command line in order to export a latex or rtf file? I looked through the cvlasso options and didn't see anything like that.

    The code I run for this example of six variables is:
    Code:
    log using model1, replace
    sjlog using model1, replace
    
     log on
    
    cvlasso pcw gkr hc em size prices c. Var_*#c. Var_* , h(1) roll  postres plotcv  
    
    cvlasso,  lop  postres
    
    predict cf, xb   lop noisily
    graph export Figure_1.pdf, replace
     
     sjlog close, replace
    Thank you for your inputs in advance

  • #2
    https://www.statalist.org/forums/for...e-class-matrix

    Comment


    • #3
      Thanks Jared, for one more time, but here I cannot see the case of creating and combining multiple models tables, simiral to esttab, estout. Do those still work for cvlasso?
      How is it done?

      Comment


      • #4
        Do you just want the LASSO coefficients themselves?

        Comment


        • #5
          Originally posted by Jared Greathouse View Post
          Do you just want the LASSO coefficients themselves?
          ​​ I got ten or so subversion of the basic model for time subperiod and groups. So, I needed to report Lasso coefficients for each model as well as the variables selected for each model along with their labels (instead of their varnane ) in a single table . It might be the case one variable selected is valid for a specific group but not for others. Just wanted to become more sofisticated.

          For example model 1, then model 2 etc. Something like similar to estout.
          ​​​​

          One other thing off the top of my head. If I wanted to cluster for specific groups and/or for specific time periods is the if option still valid here in the syntaxes?

          Say.
          Code:
          cvlasso whatever varlist if group=1&time<=2010, etc 
          ​​

          Comment

          Working...
          X