Bookmark and Share

Notice: On March 31, it was announced that Statalist is moving from an email list to a forum. The old list will shut down on April 23, and its replacement, statalist.org is already up and running.


[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: st: Problem while running a simple OLS regression


From   Louison CF <louison.cahenfourot@gmail.com>
To   statalist@hsphsun2.harvard.edu
Subject   Re: st: Problem while running a simple OLS regression
Date   Fri, 24 Feb 2012 20:17:04 +0100

Ok, it was so obvious. I do have 6 observations. Thank you very much for your answer !

Louison

Le 24 févr. 2012 à 20:07, Austin Nichols a écrit :

> Louison CF <louison.cahenfourot@gmail.com>:
> Do you have 6 observations?  If so, you can't run a regression with 7
> coefs. With 6 coefs, residuals are zero and you will not get SEs.
> 
> On Fri, Feb 24, 2012 at 1:37 PM, Louison CF
> <louison.cahenfourot@gmail.com> wrote:
>> Hello everyone,
>> 
>> 
>> Despite my researches I have found nothing helpful yet to solve my problem, so I take the liberty to send an email to statalist. Please excuse me in advance for this question which is probably not the most interesting for advanced stata users.
>> 
>> Here is my problem: I want to run a simple ols regression with 6 variables (dependant variable + 5), and for an unknown reason, Stata does not run the regression when I include all the explanatory variables, but only when I remove at least one of them. I have tried many times with removing alternatively one of my explanatory variables, and it does work no matter which one I remove. As soon as I include all the 5 explanatory variables, it doesn't work anymore and produces such an output:
>> 
>> . reg logco2 emrightaus popaus gdpcapaus enuseaus co2intensaus
>> 
>>      Source |       SS       df       MS                               Number of obs =       6
>> -------------+------------------------------                             F(  5,     0) =       .
>>       Model |  .021963775     5 .004392755           Prob > F      =       .
>>    Residual |           0     0           .                            R-squared     =  1.0000
>> -------------+------------------------------                            Adj R-squared =       .
>>       Total |  .021963775     5 .004392755                 Root MSE      =       0
>> 
>> ------------------------------------------------------------------------------
>>   logco2aus |      Coef.   Std. Err.      t    P>|t|     [95% Conf. Interval]
>> -------------+----------------------------------------------------------------
>>  emrightaus |  -.0002742          .        .       .            .           .
>>      popaus |   4.07e-07          .        .       .            .           .
>>   gdpcapaus |   .0000328          .        .       .            .           .
>>    enuseaus |    .009534          .        .       .            .           .
>> co2intensaus |   2.281203          .        .       .            .           .
>>       _cons |   2.930911          .        .       .            .           .
>> ------------------------------------------------------------------------------
>> 
>> Only the coefficient column is filled in. I do not understand where this comes from, I have checked my datas and they seem to be perfectly ok. I work with Stata 10.1 for Mac and just did an update-check, it is up-to-date.
>> 
>> I am really blocked here, and any help would be helpful.
> 
> *
> *   For searches and help try:
> *   http://www.stata.com/help.cgi?search
> *   http://www.stata.com/support/statalist/faq
> *   http://www.ats.ucla.edu/stat/stata/


*
*   For searches and help try:
*   http://www.stata.com/help.cgi?search
*   http://www.stata.com/support/statalist/faq
*   http://www.ats.ucla.edu/stat/stata/


© Copyright 1996–2014 StataCorp LP   |   Terms of use   |   Privacy   |   Contact us   |   Site index