Announcement

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

  • Rich Goldstein
    replied
    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.

    Leave a comment:


  • Justin Niakamal
    replied
    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.

    Leave a comment:


  • simoncmoore
    replied
    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.

    Leave a comment:


  • Andrew Musau
    replied
    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.

    Leave a comment:


  • Victoria Nguyen
    replied
    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.

    Leave a comment:


  • Andrew Musau
    replied
    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  
    ----------------------------------------

    Leave a comment:


  • Victoria Nguyen
    replied
    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.

    Leave a comment:


  • Rich Goldstein
    replied
    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-

    Leave a comment:


  • Victoria Nguyen
    replied
    It would be nice to have dlogit and dtobit commands in Stata 16 since we already have dprobit

    Leave a comment:


  • Leonardo Guizzetti
    replied
    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.

    Leave a comment:


  • etjernst
    replied
    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."

    Leave a comment:


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

    Leave a comment:


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

    Leave a comment:


  • Leonardo Guizzetti
    replied
    Originally posted by Jan Zouhar View Post
    I would love to see new Do-file editor features (admittedly, I am missing the features I use in RStudio when forced to operate in R):

    2) Shortcuts to (i) do/run the current chunk of code (either program definition or a section delineated by section headings, see above) and (ii) do/run from the top (currently we have Do to bottom, why not have the opposite -- which btw I find myself using much more often in R).
    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?

    Leave a comment:


  • Jan Zouhar
    replied
    I would love to see new Do-file editor features (admittedly, I am missing the features I use in RStudio when forced to operate in R):

    1) Navigation pane (with headings marked e.g. by comments in a specific format, i.e. "* Heading 1 *****").

    2) Shortcuts to (i) do/run the current chunk of code (either program definition or a section delineated by section headings, see above) and (ii) do/run from the top (currently we have Do to bottom, why not have the opposite -- which btw I find myself using much more often in R).

    3) I second the request to allow docking the do-file within the main Stata window.

    Finally, let me thank StataCorp for the wonderful additions in Stata 15 and 16. I have been a user since Stata 11 and the last two version updates have really cleared most of my earlier (unspoken) wishes.

    Leave a comment:

Working...
X