Announcement

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

  • Originally posted by Niels Henrik Bruun View Post
    I want a category version of -twoway-.
    I mean the x-scale from, e.g., boxplot and the twoway choices for the y-scale.
    Consider the command syntax: -catway rcap calculated_value1 calculated_value2 calculated_value2, over(cat1) over(cat2)-.
    what if more commands, including -twoway - understood that i.xvar would be categorical, and c.xvar would be continuous?

    Comment


    • A couple of minor things:

      1) Allowing for gradient backgrounds in plots (so, not a single color background). Excel does this and it looks quite nice.
      2) Some built in feature to easily create animated .gif files. This can be done using third-party sites and various workarounds, but it would be great if Stata had a way of taking a bunch of .png or .pdf files from graphs, and then allowing the user to combine them all together, in a particular order, specify the speed at which it cycles through the images, specify the total length of the.gif, etc.

      Comment


      • A helpful and (I would imagine) easy to implement improvement to fracreg logit and fracreg probit would allow the lower and upper bounds to be finite values other than zero and one. While it's easy to transform an outcome defined on [a,b] to one defined on [0,1] it would make some subsequent work (e.g. predict, margins, etc.) more straightforward if the natural units of measurement could be retained throughout with no need for transformation.

        Such a modification might look something like:
        Code:
        fracreg logit y x1 x2, lb(somevalue other than 0) ub(somevalue other than 1)
        For many researchers the main motivation for using fractional regression is to enforce the requirement that E[y|x] is in the [0,1] interval. The proposed modifcation would straightforwardly enforce the requirement that E[y|x] is in [a,b].
        Last edited by John Mullahy; 30 Dec 2022, 09:08.

        Comment


        • When command will obviously change the dataset structure, add a 'preserve' option. For example,
          Code:
          collapse, force preserve

          Comment


          • Re #559: How far would go with this? Would you want -gen newvar = whatever- to have a -preserve- option? Would it matter if newvar is a tempvar? What about -keep if !missing(x1, x2, x3)-?

            We all write commands like this all the time. Sometimes we will feel the need to preserve the data before we do them, but most of the time we won't. So where would you draw the line here? And what do you see as the advantage of having a preserve option in the command instead of writing preserve on a separate line? It's the same number of keystrokes either way, no?

            Comment


            • I know there are software limitations, but maybe more frames in memory at once? At the moment there's 100. Cool. Why not 1000?

              Comment


              • Jared Greathouse the number of frames increasing isn't always going to be a software limitation issue. At some point there won't be sufficient RAM on the machine to initialize additional frames. What use cases are you aware of that would require that large a number of frames to be stored concurrently in memory? I imagine it is much easier for the developers to figure out how to prioritize requests when they have some use case explaining the reason for the request (and I am absolutely guilty of pitching ideas/requests without supplying use cases as well).

                Comment


                • Chen Samulsion in your example:

                  Code:
                  collapse, force preserve
                  What would the behavior be? Would the collapse command just return the results to the result window, would it still have the normal behavior that could be reversed using -restore-, or would it be something else entirely? If you only want to be able to use -restore- following the command, why isn't the current -preserve- command sufficient? Lastly, if someone issues the -preserve- command before/after your example command, how would the two preservations be resolved? Just trying to get a better idea of the use case and whether there might be other ways to solve the problem you are trying to address.

                  Comment


                  • Hi Jared Greathouse
                    I think your request for more than 100 frames is due one of your latest projects, am I right?
                    I think something you may consider instead is not to create frames, but instead use mata to store the data you need, as if they were frames. there would be no limitation (except memory) to store as many instances of your datasets as needed.
                    Fernando

                    Comment


                    • Dear wbuchanan thank you. I only want to be able to use -restore- following the command, 'cause -collapse-, -contract- will change the entire structure, in this sense they are not as simple as -generate-. In my experience, -preserve- and -restore- are mostly designed specifically for -collapse- and -contract-. Maybe this reason is not enough to persuade most of Stata users. Stata will and should keep as laconically as possible. Entities should not be multiplied unnecessarily.

                      Comment


                      • What use cases are you aware of that would require that large a number of frames to be stored concurrently in memory?
                        I think your request for more than 100 frames is due one of your latest projects, am I right?
                        Quite right FernandoRios wbuchanan . In my edits to scul, I now use frames to store what I call the "testframe", i.e., the reshaped panel dataset where the time variable is the unique ID, and the outcomes of each unit are the columns. I originally planned to have one frame for each unit if we were doing in space placebo studies and then estimate the model that way, iteratively switching betwixt each frame until all placebos are estimated. But then I realized, we can only have 100 frames at once. Suppose we had 101 units in total... then, the frame approach won't work. But, as usual, Mata seems to solve all woes, and I suspect at some point I will integrate this fully into scul.

                        Comment


                        • A single command to promote first row values to variable names would be very helpful. There is an option for this in the import excel command, but Excel imports are not the only instance where this is relevant. Currently, my workaround is to write a simple loop through all variables to rename them with their first value, and place that into a user defined program.

                          However, it would be nice to have a native Stata command for what seems like a basic data cleaning functionality.
                          Last edited by Ali Atia; 04 Jan 2023, 16:15.

                          Comment


                          • Regarding #567, it's important to note that import delimited includes the varnames() option akin to the firstrow option in import excel.

                            Comment


                            • Regarding #567, I usually use the commands below for this sort of issue:

                              Code:
                              ds
                              capture renvars `r(varlist)' , map(strtoname(@[1]))
                              drop in 1

                              Comment


                              • Thanks for sharing. Renvars is a user written command -- I hope the functionality is implemented natively moving forward.

                                Comment

                                Working...
                                X