Announcement

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

  • Hanna Hi
    started a topic What could have I possibly done wrong?

    What could have I possibly done wrong?

    Hello,
    I just did a regression analysis and displayed a scatterplot and the points are I can't see no pattern for nearly all the variables.
    Maybe its just like that but I have the strong feeling that I did something wrong..
    Do you have any idea what could possibly cause that?

  • David Benson
    replied
    Hi Hanna Hi ,

    Sorry I am jumping into this late. I created a video on how to use dataex and code delimiters (obviously, you don't need to watch since you figured it out and successfully posted it here). I'm listing it here so future readers can find it. On YouTube it's at https://youtu.be/bXfaRCAOPbI

    Leave a comment:


  • Carlo Lazzaro
    replied
    Hanna:
    - the number of predictors to be included in the right-hand side of your regression equation should be consistent with the aim of giving a fair and true view of the data generating process;
    - even in your original regression model the R-sq was low (and significance was due to the large sample size);
    - as expected, re-running the post estimation tests on a larger sample size gives back different results (see and compare the degrees of freedom of the F-tests).

    Leave a comment:


  • Hanna Hi
    replied
    I just compared your output with mine and I have different results.
    Also for the first test (using the same command) stata displays this:
    F(3, 5446) = 1.88
    Prob > F = 0.1312

    Leave a comment:


  • Hanna Hi
    replied
    Carlo Lazzaro Thanks a lot for your help!
    Can I just repeat if I understood it correct?
    So by too many categorical variables, you mean that I should probably take less control variables?
    R-squared is too low.. but that is not really something I can do about because it refers to the whole model, is that correct?
    About the two tests you did, that means that their aren't omitted variables and there is also no heteroskedasticity, right?
    Is there any possibility to improve my results?

    Leave a comment:


  • Carlo Lazzaro
    replied
    Hanna:
    at a first glance, your regression suffers an excess of categorical predictors:
    Code:
    . regress V130 Womansright_index V240 V248 V239 V115 V147 V24 V85 V23
    
          Source |       SS           df       MS      Number of obs   =        93
    -------------+----------------------------------   F(9, 83)        =      0.53
           Model |  2.11822605         9   .23535845   Prob > F        =    0.8524
        Residual |  37.1936019        83  .448115686   R-squared       =    0.0539
    -------------+----------------------------------   Adj R-squared   =   -0.0487
           Total |   39.311828        92  .427302478   Root MSE        =    .66941
    
    -----------------------------------------------------------------------------------
                 V130 |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
    ------------------+----------------------------------------------------------------
    Womansright_index |  -.1009144   .3927768    -0.26   0.798    -.8821316    .6803028
                 V240 |   .1016473   .1495953     0.68   0.499    -.1958917    .3991862
                 V248 |   .0837466    .054947     1.52   0.131    -.0255407    .1930339
                 V239 |  -.0358435   .0633795    -0.57   0.573    -.1619028    .0902157
                 V115 |   .0249463   .0918601     0.27   0.787    -.1577596    .2076523
                 V147 |   .1121565   .1581337     0.71   0.480     -.202365    .4266781
                  V24 |  -.1023259   .2083322    -0.49   0.625    -.5166903    .3120385
                  V85 |   .0955919    .133333     0.72   0.475    -.1696022    .3607859
                  V23 |  -.0062662   .0361575    -0.17   0.863    -.0781821    .0656496
                _cons |   2.078786   .7702723     2.70   0.008     .5467454    3.610827
    -----------------------------------------------------------------------------------
    
    . estat ovtest
    
    Ramsey RESET test using powers of the fitted values of V130
           Ho:  model has no omitted variables
                      F(3, 80) =      0.95
                      Prob > F =      0.4205
    
    . estat hettest
    
    Breusch-Pagan / Cook-Weisberg test for heteroskedasticity
             Ho: Constant variance
             Variables: fitted values of V130
    
             chi2(1)      =     0.05
             Prob > chi2  =   0.8153
    
    . estat vif
    
        Variable |       VIF       1/VIF 
    -------------+----------------------
            V239 |      1.50    0.667012
            V115 |      1.37    0.728434
            V248 |      1.26    0.792934
             V24 |      1.15    0.868171
    Womansrigh~x |      1.14    0.875247
            V147 |      1.13    0.881785
            V240 |      1.13    0.884258
             V85 |      1.12    0.892015
             V23 |      1.12    0.893010
    -------------+----------------------
        Mean VIF |      1.21
    Actually, despite -regress postestimate- tests do not report any problem, the R-sq is simply too low (and non-significant) to make your model outperforming a mean estimate of the dependent variable:
    Code:
    . mean V130
    
    Mean estimation                   Number of obs   =         97
    
    --------------------------------------------------------------
                 |       Mean   Std. Err.     [95% Conf. Interval]
    -------------+------------------------------------------------
            V130 |   2.927835   .0659445      2.796936    3.058734
    --------------------------------------------------------------

    Leave a comment:


  • Carlo Lazzaro
    replied
    Hanna:
    exactly!
    Very well done!
    Thanks for your efforts.

    Leave a comment:


  • Hanna Hi
    replied
    That's what you meant, isn't it?

    Leave a comment:


  • Hanna Hi
    replied

    dataex V130 Womansright_index V240 V248 V239 V115 V147 V24 V85 V23 in 1/100

    copy starting from the next line -----------------------
    Code:
    * Example generated by -dataex-. To install: ssc install dataex
    clear
    input int V130 float Womansright_index int(V240 V248 V239 V115 V147 V24 V85 V23)
    .  .3333333 0 7 6 2 2 0 2  8
    3  .4166667 0 9 6 3 2 0 2  6
    3  .4166667 1 7 6 3 3 0 2  9
    3  .4166667 1 7 6 3 3 0 1  3
    3  .6666667 1 7 6 3 2 0 1  9
    3 .16666667 1 7 6 2 3 0 2  5
    3        .5 1 9 5 2 3 0 2  8
    3       .25 0 7 5 3 3 0 2  8
    3       .25 0 7 5 3 2 0 1  6
    3  .4166667 1 6 4 3 3 0 1  4
    4  .5833333 1 9 6 3 2 0 1  8
    3  .3333333 0 7 4 2 2 0 1  4
    3  .5833333 1 9 8 2 2 0 3  8
    2 .16666667 0 7 7 4 2 0 1  7
    4  .3333333 1 9 7 4 2 0 1 10
    3  .4166667 1 9 6 2 2 0 1  9
    4  .5833333 1 9 8 3 3 . 1  7
    1  .4166667 0 9 5 3 3 0 2 10
    3  .6666667 1 7 5 4 2 1 1  8
    2  .5833333 0 7 3 4 2 0 1  4
    4  .5833333 0 7 5 4 2 0 1  7
    3  .5833333 1 4 4 4 2 0 1  8
    4 .16666667 0 7 4 4 2 0 1  9
    4  .5833333 1 7 5 3 2 1 3  5
    4        .5 0 5 3 4 2 0 1 10
    3       .75 1 7 3 4 3 0 1  8
    3  .3333333 1 7 4 4 2 . 1  7
    3  .3333333 0 7 4 4 2 0 1  8
    3        .5 1 9 5 4 2 0 1  9
    3        .5 0 9 4 3 2 0 3  3
    3        .5 1 7 3 3 3 0 1 10
    2        .5 0 9 3 3 2 0 1  6
    3        .5 0 7 6 4 2 0 1  8
    3        .5 0 7 6 4 3 . 1  9
    2        .5 1 7 5 3 2 0 1  9
    2  .5833333 1 5 5 4 2 0 1  6
    3  .6666667 1 9 5 4 2 0 1 10
    3  .6666667 1 7 5 4 2 1 1 10
    3  .5833333 1 7 5 4 2 0 1  8
    2  .5833333 1 7 5 4 2 0 1  5
    3        .5 0 7 4 4 2 0 1  9
    2        .5 0 7 4 4 3 1 1  9
    3        .5 0 5 6 4 2 0 1 10
    3        .5 0 8 5 4 2 0 1  8
    2        .5 1 9 5 4 2 0 1  9
    3        .5 1 7 5 4 2 0 1  5
    2        .5 1 5 5 3 2 0 1  7
    3        .5 1 7 5 4 2 0 1  6
    4  .4166667 0 8 5 2 2 0 2  5
    .       .25 0 9 8 3 2 0 3  5
    3        .5 1 7 5 3 2 0 1  9
    3        .5 1 5 5 4 2 0 1  9
    3        .5 0 7 6 3 2 0 1  9
    2        .5 0 7 5 3 2 0 1  6
    3        .5 1 7 3 3 2 . 3  5
    3  .5833333 1 5 4 4 3 0 3  9
    3        .5 0 5 5 4 2 0 1  5
    3        .5 1 7 4 3 2 0 1 10
    3  .5833333 1 7 4 4 3 0 1  5
    3        .5 0 7 4 3 2 0 1  7
    3  .4166667 1 9 6 1 2 0 3  7
    3        .5 0 5 5 2 3 0 1  7
    3  .6666667 0 9 8 3 3 0 1  7
    4  .9166667 1 9 5 3 2 0 2  5
    3  .6666667 0 9 8 1 2 0 1 10
    3       .75 0 9 8 1 2 0 1  9
    3  .6666667 0 9 4 4 3 0 1  7
    3  .4166667 1 7 4 4 2 0 1  1
    3  .6666667 1 9 8 3 3 0 1  8
    4  .3333333 1 7 6 2 3 0 1  4
    1  .3333333 1 5 5 2 2 0 1  6
    3 .08333334 0 7 6 3 3 1 1  9
    4  .6666667 1 9 6 2 3 0 1  6
    3  .3333333 1 9 5 3 2 0 1  5
    3  .6666667 1 6 3 2 2 0 1  7
    3         0 0 9 7 2 2 0 1  8
    3  .9166667 1 7 6 3 3 0 1  5
    3         0 0 7 7 3 3 1 1  5
    3        .5 1 9 8 3 3 1 1  6
    4  .3333333 1 7 6 2 3 0 1  5
    3  .5833333 0 9 5 3 2 1 1 10
    4  .5833333 1 9 6 3 2 0 1 10
    3  .6666667 1 9 7 1 2 0 1 10
    3       .25 1 9 7 4 3 0 1 10
    3  .6666667 0 9 7 3 2 0 1  8
    3 .16666667 1 9 7 3 3 1 2  7
    3       .25 1 9 7 1 3 0 1  6
    3       .75 1 9 6 1 2 0 1  4
    4  .3333333 1 9 8 3 3 0 1 10
    3  .9166667 0 9 5 4 2 1 1 10
    3 .16666667 0 9 7 2 3 1 3  6
    2  .3333333 0 9 5 3 2 1 1  8
    2       .75 1 9 6 2 2 0 1  8
    2  .4166667 0 5 7 3 2 1 1  9
    2        .5 0 5 6 3 2 0 1  9
    . .16666667 1 9 4 2 2 0 1  6
    1  .5833333 1 9 9 3 2 0 1  8
    3  .3333333 0 9 7 3 3 1 1  7
    3         0 1 7 6 2 2 0 1  8
    2       .75 1 5 7 2 3 0 1  9
    end
    label values V130 V130
    label def V130 1 "Very bad", modify
    label def V130 2 "Fairly bad", modify
    label def V130 3 "Fairly good", modify
    label def V130 4 "Very good", modify
    label values V240 V240
    label def V240 0 "Male", modify
    label def V240 1 "Female", modify
    label values V248 V248
    label def V248 4 "Incomplete secondary school: technical/ vocational type", modify
    label def V248 5 "Complete secondary school: technical/ vocational type", modify
    label def V248 6 "Incomplete secondary school: university-preparatory type", modify
    label def V248 7 "Complete secondary school: university-preparatory type", modify
    label values V239 V239
    label def V239 3 "Third step", modify
    label def V239 4 "Fourth step", modify
    label def V239 5 "Fifth step", modify
    label def V239 6 "Sixth step", modify
    label def V239 7 "Seventh step", modify
    label def V239 8 "Eigth step", modify
    label values V115 V115
    label def V115 1 "None at all", modify
    label def V115 2 "Not very much", modify
    label def V115 3 "Quite a lot", modify
    label def V115 4 "A great deal", modify
    label values V147 V147
    label def V147 2 "Not a religious person", modify
    label def V147 3 "A religious person", modify
    label values V24 V24
    label def V24 0 "no trust", modify
    label def V24 1 "trust", modify
    label values V85 V85
    label def V85 1 "Would never", modify
    label def V85 2 "Might do", modify
    label def V85 3 "Have done", modify
    label values V23 V23
    label def V23 1 "Completely dissatisfied", modify
    label def V23 3 "3", modify
    label def V23 4 "4", modify
    label def V23 5 "5", modify
    label def V23 6 "6", modify
    label def V23 7 "7", modify
    label def V23 8 "8", modify
    copy up to and including the previous line ------------------

    Listed 100 out of 11400 observations

    .

    Leave a comment:


  • Hanna Hi
    replied
    dataex V130 Womansright_index V240 V248 V239 V115V147 V24 V85 V23 in 1/100

    Leave a comment:


  • Carlo Lazzaro
    replied
    Hanna:
    just type:
    Code:
    dataex V130 Womansright_index V240 V248 V239 V115V147 V24 V85 V23 in 1/100
    then copy and paste on the General forum.

    Leave a comment:


  • Hanna Hi
    replied
    Carlo LazzaroI still don't get how to export it. Is there an other command? Or do I have to type in -dataex- somewhere here?

    Leave a comment:


  • Hanna Hi
    replied
    Did I understood it correct that you are basically saying that there might be a better way to display the scatterplot but there is not really an effect to see anyways?I also tried if a ordered logistic regression fits better but there wasn't much of a difference. Do you think that would make more sense?
    And the other variables are things like, income, education social trust, religiosity etc. I'm really surprised why there seems to be no effect at all.

    Leave a comment:


  • Carlo Lazzaro
    replied
    Hanna:
    yes, and -dataex- is the answer.

    Leave a comment:


  • Hanna Hi
    replied
    Carlo Lazzaro
    is there an other way to export it than safe it as a picture?

    Leave a comment:

Working...
X