Announcement

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

  • #76
    I am very excited that v16 includes a suite of LASSO commands. I will continue to beg (from previous wish-lists) that official Stata include a suite of machine learning tools that includes all of the common approaches: regression and categorical trees, random forests, svm, boosted models, etc...

    Comment


    • #77
      To keep my Stata clean I usually have project specific ado paths. When moving from one project to another, I often use accidentally ados from the wrong project. It would be nice to have something like
      Code:
      adopath reset
      , which re-sets the ado paths to those when Stata starts.

      Comment


      • #78
        Bootstrapping in stata is too slow. Even for a simple model, stata takes 10 or even more times than it in R, SPSS, SAS, python, and Mplus. Could you make it faster in next version?

        Comment


        • #79
          I would be really happy if SEM and GSEM suites upgraded to match MPLUS and LATENT GOLD. I also would be happy to see a machine learning suite or data mining suite with trees, random forests,svm, and the likes.

          Comment


          • #80
            This should be a simple one, but it would be really convenient: make -fullnames- the default option for -describe-.

            Comment


            • #81
              In earlier years I have proposed that -merge m:m- be eliminated. StataCorp has not done that. I imagine they have their reasons. So let me suggest a compromise position:

              Since what -merge m:m- does is rarely needed in practical applications, change -merge m:m- so that, by default, it functions as a synonym for -joinby-. Allow those who want the old behavior to specify it as an option. ( I would call the option -datasalad-, but perhaps that's too snarky.) Do not sustain the old behavior under version control. I say that because I am willing to wager that for every existing correct application of -merge m:m- in existence there are hundreds if not thousands that are producing incorrect results, and in most cases changing that to -joinby- behavior will actually correct the problem..

              Comment


              • #82
                One of my wishes is to have the ability to append non dta files like xlsx or csv without having to save it as dta file first. This functionality could be restricted to files that has the same variable list initially later be expanded. I really dont understand why an xlsx file needs to be imported and saved as dta to be able to append it. Perhaps the import command may be modified to bypass that step.

                Comment


                • #83
                  Originally posted by Oscar Ozfidan View Post
                  One of my wishes is to have the ability to append non dta files like xlsx or csv without having to save it as dta file first.
                  I don't have any problem with that, but if it bothers you, then you can import from Excel workbooks without having to save anything. Just use Stata's suite of commands for ODBC, as illustrated below. Begin at the "Begin here" command; the top part is just to set up an Excel workbook with two worksheets for illustration.

                  .ÿ
                  .ÿversionÿ16.0

                  .ÿ
                  .ÿclearÿ*

                  .ÿ
                  .ÿsetÿseedÿ`=strreverse("1530251")'

                  .ÿquietlyÿsetÿobsÿ3

                  .ÿ
                  .ÿgenerateÿbyteÿridÿ=ÿ_n

                  .ÿgenerateÿdoubleÿvanÿ=ÿruniform()

                  .ÿformatÿvanÿ%04.2f

                  .ÿgenerateÿstr1ÿvacÿ=ÿchar(64ÿ+ÿruniformint(0,ÿ26))

                  .ÿ
                  .ÿquietlyÿexportÿexcelÿusingÿTest.xlsx,ÿsheet(First10)ÿfirstrow(variables)ÿreplace

                  .ÿlist,ÿnoobs

                  ÿÿ+------------------+
                  ÿÿ|ÿridÿÿÿÿvanÿÿÿvacÿ|
                  ÿÿ|------------------|
                  ÿÿ|ÿÿÿ1ÿÿÿ0.48ÿÿÿÿÿGÿ|
                  ÿÿ|ÿÿÿ2ÿÿÿ0.89ÿÿÿÿÿOÿ|
                  ÿÿ|ÿÿÿ3ÿÿÿ0.03ÿÿÿÿÿLÿ|
                  ÿÿ+------------------+

                  .ÿ
                  .ÿquietlyÿreplaceÿridÿ=ÿ_Nÿ+ÿ_n

                  .ÿquietlyÿreplaceÿvanÿ=ÿruniform()

                  .ÿquietlyÿreplaceÿvacÿ=ÿchar(64ÿ+ÿruniformint(0,ÿ26))

                  .ÿ
                  .ÿquietlyÿexportÿexcelÿusingÿTest.xlsx,ÿsheet(Next10)ÿfirstrow(variables)

                  .ÿlist,ÿnoobs

                  ÿÿ+------------------+
                  ÿÿ|ÿridÿÿÿÿvanÿÿÿvacÿ|
                  ÿÿ|------------------|
                  ÿÿ|ÿÿÿ4ÿÿÿ0.86ÿÿÿÿÿXÿ|
                  ÿÿ|ÿÿÿ5ÿÿÿ0.43ÿÿÿÿÿGÿ|
                  ÿÿ|ÿÿÿ6ÿÿÿ0.86ÿÿÿÿÿIÿ|
                  ÿÿ+------------------+

                  .ÿ
                  .ÿdropÿ_all

                  .ÿ
                  .ÿ*
                  .ÿ*ÿBeginÿhere
                  .ÿ*
                  .ÿlocalÿdsnÿExcelÿFiles;DBQ=Test.xlsx;DefaultDir=`c(pwd)';

                  .ÿ
                  .ÿodbcÿload,ÿ///
                  >ÿÿÿÿÿÿÿÿÿexec("SELECTÿ*ÿFROMÿ[First10$]ÿUNIONÿALLÿSELECTÿ*ÿFROMÿ[Next10$];")ÿ///
                  >ÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿÿdsn("`dsn'")

                  .ÿ
                  .ÿformatÿvanÿ%04.2f

                  .ÿlist,ÿnoobsÿseparator(3)

                  ÿÿ+------------------+
                  ÿÿ|ÿridÿÿÿÿvanÿÿÿvacÿ|
                  ÿÿ|------------------|
                  ÿÿ|ÿÿÿ1ÿÿÿ0.48ÿÿÿÿÿGÿ|
                  ÿÿ|ÿÿÿ2ÿÿÿ0.89ÿÿÿÿÿOÿ|
                  ÿÿ|ÿÿÿ3ÿÿÿ0.03ÿÿÿÿÿLÿ|
                  ÿÿ|------------------|
                  ÿÿ|ÿÿÿ4ÿÿÿ0.86ÿÿÿÿÿXÿ|
                  ÿÿ|ÿÿÿ5ÿÿÿ0.43ÿÿÿÿÿGÿ|
                  ÿÿ|ÿÿÿ6ÿÿÿ0.86ÿÿÿÿÿIÿ|
                  ÿÿ+------------------+

                  .ÿ
                  .ÿeraseÿTest.xlsx

                  .ÿ
                  .ÿexit

                  endÿofÿdo-file


                  .

                  Comment


                  • #84
                    I love Stata overall but here are a few enhancements that would make it better:

                    1 Schemes for output akin to the graph schemes. A lot of researchers want two decimal places for t statistics and coefficients and three for p values for which they want three. Others may want three. Either way a quick way to specify this would be nice. Some sort of native outreg command along with schemes would be good too. If I want to publish an APA style table, it would be nice if I could just specify a couple of options in the main regression command and not rely on outreg.

                    2. Something the like the PROCESS model that Preacher and Hayes created for SPSS and SAS--a single command that could be used to generate a test as PROCESS does with rich output showing you everything you need to know about the model.

                    Comment


                    • #85
                      re: #1 in #84 - please see
                      Code:
                      help cformat
                      I have no idea what is meant by the second point in #84

                      Comment


                      • #86
                        this should be simple (?):
                        if i run margins, followed by marginsplot - great.
                        if i re-run marginplot with different options (such as noci, axis range, etc), - great
                        but if i save the generated graph and try to re-generate the graph - go go
                        previous command was not margins
                        r(301)

                        for complex analyses, it may take many minutes or even hours to regenerate margins.
                        does saving the graph really destroy results of the last margins command to make marginsplot not work?

                        Comment


                        • #87
                          I'm not sure exactly why this happens, but if you add the -post- option to your -margins- command, you will still be able to run -marginsplot- again after saving the graph that -marginsplot- creates. I don't know why -graph save- interferes with it in the first place, but -margins, post- seems to overcome that limitation.

                          Comment


                          • #88
                            The problem in #86 and the workaround in #87 remind me of a wish that I have stated at a Users Group Meeting a couple of years ago: make nclass programs respect r() results.

                            The problem is that many commands, e.g., graph save, do not return anything in r(). Yet, these commands call other commands, e.g., file, that do store contents in r(). As a result, previous results in r(), e.g., from margins, are wiped. Stata programs can already be declared nclass (i.e., declared to return nothing) but that does not seem to have any effect at all. I wish that nclass preserves r() (and e(), and perhaps even s()) results. Do this under version control or add a qualifier-syntax, e.g., nclass(preserve {r|e|s})to make sure that code continues to work.

                            Returning to #86, a solution that presreves both e() results from the estimation command and r() results from margins, is

                            Code:
                            tempname rr
                            _return hold `rr'
                            _return restore `rr' , hold
                            commands that wipe r()
                            _return restore `rr'
                            See

                            Code:
                            help _return
                            Best
                            Daniel

                            Comment


                            • #89
                              daniel and Clyde - both suggestions are helpful and instructive. thank you
                              george

                              Comment


                              • #90
                                Originally posted by Rich Goldstein View Post
                                I have no idea what is meant by the second point in #84
                                Chris was referring to the PROCESS macro written by A.F. Hayes. It is widely used by people in psychology.

                                Chris, FWIW, I think you'd be better off learning how to roll your own analyses with the tools that are available to you in Stata (e.g., -sem-, -margins-, -marginsplot-). There are many examples online to guide you. E.g., here are some examples to get you started: HTH.

                                PS- See also the -mediation- command by Raymond Hicks & Dustin Tingley. Perhaps it will meet your needs?

                                Code:
                                ssc describe mediation
                                Last edited by Bruce Weaver; 13 Jan 2020, 12:04. Reason: Added the PS.
                                --
                                Bruce Weaver
                                Email: [email protected]
                                Web: http://sites.google.com/a/lakeheadu.ca/bweaver/
                                Version: Stata/MP 18.0 (Windows)

                                Comment

                                Working...
                                X