Announcement

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

  • Cluster support for the new lasso suite of commands would be really helpful.

    Comment


    • Jeff Grogger, I think rlasso, part of lassopack (on SSC or https://statalasso.github.io/docs/lassopack/) includes penalty loadings which account for clustering.

      Comment


      • Originally posted by Leonardo Guizzetti View Post

        This one confuses me.The do-file editor already allows "Execute (do)" (Ctrl + D, on Windows) which allows the entire script to be run from the top. Or if you highlight some lines, the same thing will also execute just those lines of code. What is it that you are missing?
        I am not the OP of #149 but I suspect the following (which I would also like to see): you are in the middle of a .do file. You can run the whole .do file with Ctrl+D, select code by highlighting, or "run to bottom." I think they are asking for a "run to here," which runs the complement of "run to bottom."

        Comment


        • Thank you. I imagine that could be an easy feature to implement. For a long time, I've simulated the "run to here" behaviour by adding a line of code where I want Stata to stop that reads "fail", so that Stata will throw an error and stop.

          Comment


          • It would be nice to have dlogit and dtobit commands in Stata 16 since we already have dprobit
            Victoria Nguyen
            PhD in Econometrics
            Help you move forward and achieve your goals faster
            https://statatutoring.weebly.com/

            Comment


            • re: #155 - the current help file for -dprobit- says the following:
              dprobit continues to work but, as of Stata 11, is no longer an official
              part of Stata. This is the original help file, which we will no longer
              update, so some links may no longer work.

              See margins for a recommended alternative to dprobit.
              given that, it seems highly unlikely that StataCorp will do what you request - further, it is hard to see why you are requesting what you request - what is that you think -dprobit- provides that you cannot get from -margins-

              Comment


              • The reason I like dprobit is that it works like probit where I can change the specification of the model, change the sample, different conditions, and attach all the marginal effects of those models to compare with the baseline OLS quickly (using est store). This works very nicely especially when we need to export out table of results for publications with different models.

                With the margins, I need to run each model and use esttab to get the result for each model. With the inability to combine marginal effects in one shot for different models, it seems very inefficient in the practical world.

                I was thinking with the dlogit, it will help me get the marginal effects of all the models that I have, for probit, logit, linear, etc...in one shot and compare the results simultaneously.
                Victoria Nguyen
                PhD in Econometrics
                Help you move forward and achieve your goals faster
                https://statatutoring.weebly.com/

                Comment


                • Victoria Nguyen, I think what you are missing out on is the -post- option of margins. At this day and age, I wouldn't touch dprobit as it does not support factor variables and its computation of the marginal effects differs slightly to that of margins.

                  Code:
                  webuse lbw
                  qui probit low age lwt i.race
                  margins, dydx(*) post
                  est sto est1
                  qui probit low age lwt smoke i.race
                  margins, dydx(*) post
                  est sto est2
                  est table est*
                  ​​​​​
                  Res.:

                  Code:
                  . est table est*
                  
                  ----------------------------------------
                      Variable |    est1         est2    
                  -------------+--------------------------
                           age |  -.0053738   -.00460836  
                           lwt | -.00283621   -.00242849  
                               |
                          race |
                        black  |  .21613804    .24743497  
                        other  |   .0879782    .18158954  
                               |
                         smoke |               .20759631  
                  ----------------------------------------

                  Comment


                  • Andrew Musau: Can you elaborate and provide and example on how dprobit result, or
                    its computation of the marginal effects differs slightly to that of margins
                    Thanks for your example. I can definitely use -post- option to combine marginal effects for different models and samples.
                    Victoria Nguyen
                    PhD in Econometrics
                    Help you move forward and achieve your goals faster
                    https://statatutoring.weebly.com/

                    Comment


                    • Consider the coefficients of the categorical variables below. It's just a slight difference, but a difference nonetheless.

                      Code:
                      webuse lbw
                      xi: dprobit low age lwt smoke i.race
                      qui probit low age lwt smoke i.race
                      margins, dydx(*) atmeans
                      Res.:

                      Code:
                      . xi: dprobit low age lwt smoke i.race
                      i.race            _Irace_1-3          (naturally coded; _Irace_1 omitted)
                      
                      Iteration 0:   log likelihood =   -117.336
                      Iteration 1:   log likelihood =  -107.2184
                      Iteration 2:   log likelihood = -107.02541
                      Iteration 3:   log likelihood = -107.02511
                      
                      Probit regression, reporting marginal effects           Number of obs =    189
                                                                              LR chi2(5)    =  20.62
                                                                              Prob > chi2   = 0.0010
                      Log likelihood = -107.02511                             Pseudo R2     = 0.0879
                      
                      ------------------------------------------------------------------------------
                           low |      dF/dx   Std. Err.      z    P>|z|     x-bar  [    95% C.I.   ]
                      ---------+--------------------------------------------------------------------
                           age |  -.0049427   .0070335    -0.70   0.483   23.2381  -.018728  .008843
                           lwt |  -.0026047     .00128    -2.02   0.043    129.82  -.005113 -.000096
                         smoke*|   .2277838   .0785581     2.89   0.004   .391534   .073813  .381755
                      _Irace_2*|   .2837575   .1194391     2.43   0.015   .137566   .049661  .517854
                      _Irace_3*|   .2027655   .0879829     2.33   0.020   .354497   .030322  .375209
                      ---------+--------------------------------------------------------------------
                        obs. P |   .3121693
                       pred. P |   .2912381  (at x-bar)
                      ------------------------------------------------------------------------------
                      (*) dF/dx is for discrete change of dummy variable from 0 to 1
                          z and P>|z| correspond to the test of the underlying coefficient being 0
                      
                      . 
                      . qui probit low age lwt smoke i.race
                      
                      . 
                      . margins, dydx(*) atmeans
                      
                      Conditional marginal effects                    Number of obs     =        189
                      Model VCE    : OIM
                      
                      Expression   : Pr(low), predict()
                      dy/dx w.r.t. : age lwt smoke 2.race 3.race
                      at           : age             =     23.2381 (mean)
                                     lwt             =    129.8201 (mean)
                                     smoke           =    .3915344 (mean)
                                     1.race          =    .5079365 (mean)
                                     2.race          =    .1375661 (mean)
                                     3.race          =    .3544974 (mean)
                      
                      ------------------------------------------------------------------------------
                                   |            Delta-method
                                   |      dy/dx   Std. Err.      z    P>|z|     [95% Conf. Interval]
                      -------------+----------------------------------------------------------------
                               age |  -.0049427   .0070335    -0.70   0.482    -.0187281    .0088427
                               lwt |  -.0026047     .00128    -2.03   0.042    -.0051134   -.0000959
                             smoke |   .2226555   .0763592     2.92   0.004     .0729942    .3723168
                                   |
                              race |
                            black  |   .2637562   .1141854     2.31   0.021      .039957    .4875554
                            other  |   .1924147   .0829444     2.32   0.020     .0298466    .3549827
                      ------------------------------------------------------------------------------
                      Note: dy/dx for factor levels is the discrete change from the base level.

                      Comment


                      • I have a few of wishes.

                        Better use of GPU processing power would be nice

                        Singular Spectrum Analysis and related approaches to longitudinal data?

                        An option to encrypt data files using OpenPGP certificates and keys, mostly so that remote users can make better use of cloud storage

                        I regularly receive lots of little files on a regular basis that need to be appended to a larger data set. It would be nice to be able to append, then zip the new file and save to an archive in a do file. At the momet I call a batch file to do this, but would much rather do this in Stata.

                        Finally, I've not been able to get - gen coffee, black strong - to work for me and have to make my coffee manually, some thought on this potentially important issue would be welcome.

                        Comment


                        • Not sure how difficult it is, but would like to see an option to add base maps to spmap.It does have a basemap option, but what I'm referring to is the ability to underlay a map such as Google road/satellite/hybrid, etc similar to how you do in GIS software(s).

                          On a (somewhat) related note, an update to the NetCourse offerings would also be appreciated if that's something Stata would consider. For example, Spatial Models using Stata, Bayesian analysis in Stata, Machine Learning using Stata, Policy Analysis using Stata, etc.

                          Comment


                          • in #152, first paragraph - -spmap- is user-written (community contributed if you prefer) and thus this is the wrong place to ask for changes - you need to contact the author (see the end of the spmap help file)

                            as Bruce Weaver kindly pointed out, I meant #162, not #152 - sorry for the typo
                            Last edited by Rich Goldstein; 02 Apr 2020, 13:27.

                            Comment


                            • Then I'll just simply rephrase the wish as I would like to see StataCorp produce an official command similar to the user-written spmap with additional features such as the ability to add a base map similar to how you you're able to in GIS software.

                              Comment


                              • simoncmoore;n1544322]I have a few of wishes.

                                .
                                An option to encrypt data files using OpenPGP certificates and keys, mostly so that remote users can make better use of cloud storage
                                How do you use cloud storage even without OpenPGP? AFAICT all cloud storage options are object storage - and I don't see how to read/write an object with Stata other than shelling out to copy and covert the object to/from a local file. If there is a better way, that is important information. There is some information about Stata in the cloud here: https://blog.stata.com/2019/11/05/stata-in-the-cloud/ but no mention of files.

                                Daniel Feenberg

                                Comment

                                Working...
                                X