Announcement

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

  • Multiple Regression Issues - Stata not showing any information

    Hi! I am trying to do a multiple regression but when I try to do it, I don't get any of the p-values, st errors or t values. Please let me know what I am doing wrong! Thank you so much!

    All of my variables are binary and I am using the following code:

    regress V162034a V161345 V161320 V161157



    Source | SS df MS Number of obs = 6
    -------------+---------------------------------- F(3, 2) = .
    Model | .833333333 3 .277777778 Prob > F = .
    Residual | 0 2 0 R-squared = 1.0000
    -------------+---------------------------------- Adj R-squared = 1.0000
    Total | .833333333 5 .166666667 Root MSE = 0

    ------------------------------------------------------------------------------
    V162034a | Coef. Std. Err. t P>|t| [95% Conf. Interval]
    -------------+----------------------------------------------------------------
    V161345 | -5.07e-17 . . . . .
    V161320 | 2.03e-16 . . . . .
    V161157 | -1 . . . . .
    _cons | 3 . . . . .
    ------------------------------------------------------------------------------



  • #2
    Recall that Stata omits from the model any observation for which any independent or dependent variable has a missing value. The results you posted show that only 6 observations were included in the regression once this was done.

    For the six observations that remained, the model V162034a = 3 - V161345 essentially first the data perfectly - hence the R2 value of 1. And with a perfect fit, there are no standard errors, and thus no t statistics or p values for those statistics.

    Comment


    • #3
      Thank you for your response! When I run bivariate regressions of each independent variable I have much larger observed values. Do you know why it shows as 6 when I run a multiple regression? Is there any way to fix this? I have already recoded missing values.

      Comment


      • #4
        Shadi:
        there's simply no scope in performing any regression with a sample size=6.
        That said, it seems that your results show no variation in the predictors, the number of which is also dangerously near to sample size.
        The following toy-example seems to mimick your results:
        Code:
        . use "C:\Program Files\Stata16\ado\base\a\auto.dta"
        (1978 Automobile Data)
        
        . regress price mpg if _n<=2
        
              Source |       SS           df       MS      Number of obs   =         2
        -------------+----------------------------------   F(1, 0)         =         .
               Model |      211250         1      211250   Prob > F        =         .
            Residual |           0         0           .   R-squared       =    1.0000
        -------------+----------------------------------   Adj R-squared   =         .
               Total |      211250         1      211250   Root MSE        =         0
        
        ------------------------------------------------------------------------------
               price |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
        -------------+----------------------------------------------------------------
                 mpg |       -130          .        .       .            .           .
               _cons |       6959          .        .       .            .           .
        ------------------------------------------------------------------------------
        Kind regards,
        Carlo
        (Stata 19.0)

        Comment


        • #5
          To respond to the question in post #3, when you run
          Code:
          regress V162034a V161345
          those observations with missing values for either V162034a or V161345 are eliminated. When you add two more independent variables
          Code:
          regress V162034a V161345 V161320 V161157
          now additionally observations with missing values for either V161320 or V161157 are also eliminated.

          Perhaps the commands
          Code:
          misstable summarize V162034a V161345 V161320 V161157
          misstable patterns V162034a V161345 V161320 V161157
          will help you understand the effect of missing values on your sample.

          Comment

          Working...
          X