Announcement

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

  • Regressing many variables

    I am running a multiple regression with a lot of dependent variables. As a result Stata is unable to run the regression due to the number of observations. Is there another way to run this regression and still include all the variables?

  • #2
    Nonsi:
    have you already taken a look at -help mvreg-?
    Kind regards,
    Carlo
    (Stata 19.0)

    Comment


    • #3
      Just a side note, after Carlo’s insightful advice.

      The query could be more informative. For example, instead of ‘lots of DVs”, you could inform the real number as well as the number of observations. I’m also raising an eyebrow at ‘lots of DVs”. I suspect you meant ‘several independent variables’. To end, I fear the issue may not be related to Stata being ‘unable’ to perform a given regression, for the impossibility seems to be related to the (potentially wrong) modeling itself.
      Last edited by Marcos Almeida; 17 Jun 2018, 06:28.
      Best regards,

      Marcos

      Comment


      • #4
        My guess follows Marcos. It is that Nonsi has more independent variables (predictors) than observations in a regression analysis with one dependent variable (outcome or response). I say this partly because multivariate regression is much less often used than multiple regression and partly because I have so often seen people muddled over which variables are dependent and independent, one of several reasons to drop this terminology.

        If so, there is no congenial remedy except choosing a much simpler model or finding more data.

        Comment


        • #5
          i am running the following regression:

          reg DBMI i.EXERCISE SLEEP2 FIZZY TAKEAW i.sex i.LOIL i.DBENEFIT0U RENT i.Alcever NOFCIGS i.state1HS

          And the feedback i am getting is:
          no observations
          r(2000);


          Kind Regards
          Nonsi Nkomo

          Comment


          • #6
            To start, with - regress - you must have only one DV.

            Second, please use the code delimiters to share command/data/output, as recommended in the FAQ.

            Third, there are a couple of reasons for the ‘no observations’ message, listwise deletion and presence of string variable being in the foreground.

            If you need further help, please act according to the FAQ advice. This is the best strategy to reap a clarifying answer to your query.
            Best regards,

            Marcos

            Comment


            • #7
              My DV is DBMI. I have checked and all my variables are numeric. There are some stored s integers though, I don't know if that could be affecting the regression?

              Comment


              • #8
                If I understood correctly, in #1 you informed to have "a lot of dependent variables". Yet in #7 you informe to have just one.

                Please act according to the advice already given. Please provide information according to the FAQ advice.

                You may use -dataex - to provide a fraction of the data.

                If you have Stata 15.1, you just need to type - help dataex - to get examples. If you have an older version - ssc install dataex - will install the program.

                Hopefully that helps.
                Best regards,

                Marcos

                Comment


                • #9
                  My initial post was meant to say "independent variables." Thank you for the help, will do as advised.

                  Kind Regards
                  Nonsi Nkomo

                  Comment


                  • #10
                    Originally posted by nonsi nkomo View Post
                    the feedback i am getting is:
                    no observations
                    r(2000);
                    I have checked and all my variables are numeric.
                    Code:
                    help misstable

                    Comment

                    Working...
                    X