Bookmark and Share

Notice: On April 23, 2014, Statalist moved from an email list to a forum, based at statalist.org.


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

RE: st: xtreg fixed effect


From   Nick Cox <[email protected]>
To   "'[email protected]'" <[email protected]>
Subject   RE: st: xtreg fixed effect
Date   Wed, 9 Nov 2011 15:22:52 +0000

I believe you. That is why you didn't get an error message r(2000). 

As Fernando has explained, you have few data or too many parameters for what you are doing, so Vikram's suggestion is not the answer either way. 

Nick 
[email protected] 

donsaane

Thanks Nick , 
But all my variables are byte, they are not string.

Nick Cox

Not so:

 webuse nlswork
 xtset idcode
 generate age2 = age^2
 xtreg ln_w grade age* 

<all work fine> 

.  gen badvar = string(_n) 

.  xtreg ln_w grade age* badvar 
no observations
r(2000);

Nick 
[email protected] 

Vikram Finavker

Have you checked the 3 variables which you are adding. If they are
string then stata will give you these message.

On 9 Nov 2011, at 03:30 AM, donsaane <[email protected]> wrote:

> I am running a fixed effect model. I have to run this model with 16
> variables but I can only run with 13 variables because the R-squared is
> 0.984. When I add the 3 others variables, stata said: 'insufficient
> obervations' although these variables have many observations. Is there a
> problem with that? I f yes how can I solve that.
> PS: I'm working on a balanced panel
> Here the example of my output
>
>
> xtreg emploi c30a j30f c30b d30a d30b e30 g30a h30 i30 j30a j30b, fe
> vce(robust)
>
> Fixed-effects (within) regression               Number of obs      =
> 82
> Group variable: panelid                         Number of groups   =
> 70
>
> R-sq:  within  = 0.9874                         Obs per group: min =
> 1
>       between = 0.0672                                        avg =
> 1.2
>       overall = 0.0605                                        max =
> 2
>
>                                                F(11,69)           =
> 118.55
> corr(u_i, Xb)  = -0.9701                        Prob > F           =
> 0.0000
>
>                               (Std. Err. adjusted for 70 clusters in
> panelid)
>
----------------------------------------------------------------------------
> --
>             |               Robust
>      emploi |      Coef.   Std. Err.      t    P>|t|     [95% Conf.
> Interval]
>
-------------+--------------------------------------------------------------
> --
>        c30a |   .9143767    .059555    15.35   0.000     .7955678
> 1.033186
>        j30f |    -.47526    .030562   -15.55   0.000    -.5362296
> -.4142904
>        c30b |   .0024208   .0192561     0.13   0.900     -.035994
> .0408356
>        d30a |  -.2705821   .0331653    -8.16   0.000    -.3367451
> -.2044191
>        d30b |  -.5215098   .0365427   -14.27   0.000    -.5944105
> -.4486091
>         e30 |  -.4530234   .0565547    -8.01   0.000     -.565847
> -.3401997
>        g30a |   .5852609   .0403684    14.50   0.000     .5047281
> .6657937
>         h30 |  -.1785489   .0161245   -11.07   0.000    -.2107165
> -.1463814
>         i30 |     -.0622   .0232747    -2.67   0.009    -.1086317
> -.0157683
>        j30a |  -.6889813   .0697342    -9.88   0.000    -.8280972
> -.5498655
>        j30b |   .4019738   .0364463    11.03   0.000     .3292655
> .4746821
>       _cons |    2.07585   .2529012     8.21   0.000     1.571326
> 2.580374
>
-------------+--------------------------------------------------------------
> --
>     sigma_u |   1.915378
>     sigma_e |  .13146307
>         rho |  .99531125   (fraction of variance due to u_i)
>
----------------------------------------------------------------------------
> --
>
> . xtreg emploi c30a j30f c30b d30a d30b e30 g30a h30 i30 j30a j30b  j30c,
fe
> vce(robust)
> insufficient observations
> r(2001);

*
*   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–2018 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   Site index