Announcement

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

  • I would like to have a custom message for the assert command, to replace this red with green code:

    Code:
    capture assert t>=x+y
    if (_rc==9) {
      display "Invalid data on land use. Total must be at least as large as owned+rented."
      error 9
    }
    else {
      if _rc assert t>=x+y
    }
    
    assert t>=x+y, message("Invalid data on land use. Total must be at least as large as owned+rented.")
    The green code is somewhat more readable and portable.
    Clearly I want to separate the situations when, for example, x does not exist from situations when t<x+y.

    The current error message "Assertion is false" may stay of course. I just want to be a bit more explicit (both for the coding and for the user that gets the message) on what is being checked and what went wrong.

    This is common in other systems, see e.g. Microsoft's Visual Studio/C# reference.

    Comment


    • -describe- abbreviates the names of variables, but, mercifully, has a -fullnames- option that lets you get the whole name. Make a -fullnames- option for -summarize- as well. Better still, make -fullnames- the default behavior in both commands, with an -abbrev(#)- option.

      Comment


      • In response to alejoforero 's post #180 requesting a function that would be like gsort for macros.

        Stata's response to the command "search sort reverse list" is singularly unhelpful. (It produces only three suggestions, one of which is UCLA's web book on linear regression and the other three are links to all the SSC commands beginning with the letters "o", "r" and "v".

        I next deployed the still documented, but no longer supported, official Stata command hsearch to search through my own help files. hsearch is a pretty cool command, especially for those of us who have installed many community contributed programs over the years. Its results remind me of two relevant community contributed commands that I installed years ago and then forgot:

        The command that most directly accomplishes exactly what alejoforero requests is listsort by Patrick Royston, version 1.0.0 dated 16Feb2001, with the publication of his related Stata Journal article entitled "Sort of a list of items". Type "search listutil" from inside Stata and click on the hotlink to "dm0001".

        Code:
        global unsorted= "MEX ALB CHN"
        global sorted: list sort global(unsorted)
        di "$sorted"
        ALB CHN MEX
        
        listsort "$unsorted", lexicographic
        di "`s(list)'"
        ALB CHN MEX
        
        listsort "$unsorted", lexicographic reverse
        di "`s(list)'"
        MEX CHN ALB
        The other related user contribution is Nick Cox 's listutil , distributed April 2001. This is a prodigious collection of 37 utilities each of which performs a different, potentially useful, operation on a list of Stata "words". Glancing through the listutil help file on the 37 utilities, I do not immediately see one that duplicates the behavior of listsort.

        I endorse the view that the capabilities of both of these community contributed commands would be helpful if embedded in official Stata.
        Last edited by Mead Over; 15 Nov 2021, 06:56.

        Comment


        • To have beautiful color of visualization, a comparable with other statistics software

          Comment


          • I want to endorse the implicit request in #183 - please bring back -hsearch-; yes, it has issues but nothing else does what it does and I sill use it

            Comment


            • I would like Stata to add support for vertical placement of text elements in graphs. Most letter fonts align too low on labels, making them feel misaligned with gridlines. This option would prevent that.

              Attached Files
              Last edited by Daniel Fernandes; 15 Nov 2021, 10:23.

              Comment


              • I wonder whether it would be possible/necessary to implement a "frame browse frame2" while also browse the data of frame1. So I basically like to have two Data Editors open simultaneously. Or is there another way to achieve this?

                Comment


                • Hi there

                  I think that further development of discrete choice capabilities is needed:
                  - more distributions for panel mixed logit (ideally even including the capability to combine discrete and continuous mixtures -> this would be a very flexible method that bridges latent class and mixed logit, after all both models are identical, just differ in whether parameters follow a continuous or discrete distribution)
                  - conditional parameters after panel mixed logit like in Arne Hole's package
                  - WTP space option for all discrete choice models
                  - Sobol draws for panel mixed logit
                  - a native latent class model that also automatically computes the average model (if the flexible method above is not implemented) and conditional parameters
                  - hybrid choice model support -> this should be easy to do given the SEM capabilities
                  - a flexible way of specifying the utility function
                  - pragmatic ways of testing convergence after a discrete choice model (e.g. grid search)
                  - speed these models up!

                  Generally, adding more flexibility to the discrete choice models will be needed to maintain competitive in this field of analysis.

                  Comment


                  • I would like Stata to incorporate Nick Cox’s -catplot- http://fmwww.bc.edu/RePEc/bocode/c/catplot.html as official command. All too often, when I am a little rusty at graph bar I always apply it inappropriately to category variable and the result can be imagined. And this is indeed frustrating experience sometimes.

                    Comment


                    • Apologies if this is a repeat suggestion. I wish -summarize- had an option to display variable labels in the output. And before anyone suggests it, yes, I do know about -labsumm-.

                      Code:
                      ssc describe labsumm
                      --
                      Bruce Weaver
                      Email: [email protected]
                      Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
                      Version: Stata/MP 18.0 (Windows)

                      Comment


                      • I have found the Project Manager to be helpful in organizing my files. But, files and groups can only be shown alphabetically and cannot be ordered in any other way like dragging and dropping them.

                        My solution has been to name files using an index number, e.g. "01-Diabetes-import_data.do". But, renaming files as new ones are added is tedious and error-prone. It would be great to be able to specify the order of the contents of the Project Manager.

                        Best,
                        Alan

                        Comment


                        • I wish the stata18 should add a official command to analyze multiple choice questions, combining with table command will be great.

                          Comment


                          • Originally posted by Thein Zaw View Post
                            To have beautiful color of visualization, a comparable with other statistics software
                            What stops you from doing this now?

                            Comment


                            • I wish there were commands to model time series of event counts. For instance, Poisson Exponentially Weighted Moving Average (PEWMA) and Poisson Autoregressive Model (PAR).

                              Comment


                              • Integrating Levenstein distance fuzzy string matching algorithms would be extremely useful. SAS had this function for a long time using COMPGED and it is much better at merging similar string data, such as names, than probabilistic matching.

                                Comment

                                Working...
                                X