Statalist


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

Re: st: Time series quadrature error


From   Mark Ludwig <[email protected]>
To   "[email protected]" <[email protected]>
Subject   Re: st: Time series quadrature error
Date   Fri, 2 Oct 2009 11:34:47 -0700

On Oct 2, 2009, at 7:51 AM, Austin Nichols wrote:

Start with

loc v "war income male PID education L.war_casualties L.dem_iraq_email
L.GOP_iraq_email L.dem_iraq_web L.GOP_iraq_web L.media_iraq"
su `v' if tin(2007m9, 2008m3)
xtsum `v' if tin(2007m9, 2008m3)
reg `v' if tin(2007m9, 2008m3)
logit `v' if tin(2007m9, 2008m3)

to help diagnose the problem with your data.

On Thu, Oct 1, 2009 at 10:57 PM, Mark Ludwig <[email protected]> wrote:

 sort id date

. tsset id date, monthly
      panel variable:  id (weakly balanced)
       time variable:  date, 2007m7 to 2008m11
               delta:  1 month

.
. xtlogit war income male PID education L.war_casualties L.dem_iraq_email
L.GOP_iraq_email L.dem
_iraq_web L.GOP_iraq_web L.media_iraq if tin(2007m9, 2008m3)
number of quadrature points must be less than or equal to number of obs
r(198);


*
*   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/

Here's what I get when I try Austin Nichols' suggestion. The crux of the problem seems to be that when I try to create lags, it generates missing observations.

 sort id date

.. tsset id date, monthly
       panel variable:  id (weakly balanced)
        time variable:  date, 2007m7 to 2008m11
                delta:  1 month

..
.. loc v "war income male PID education L.war_casualties L.dem_iraq_email L.GOP_iraq_email L.dem_
> iraq_web L.GOP_iraq_web L.media_iraq"

.. su `v' if tin(2007m9, 2008m3)

    Variable |       Obs        Mean    Std. Dev.       Min        Max
-------------+--------------------------------------------------------
         war |      7103     .267915    .4429042          0          1
      income |      6447    5.578253    2.273915          1         11
        male |      7103    .4971139    .5000269          0          1
         PID |      6876    .0900233    .9608538         -1          1
   education |      7061    6.664637    1.437452          1          8
-------------+--------------------------------------------------------
war_casual~s |
       L1. |         0
dem_iraq_e~l |
         L1. |         0
GOP_iraq_e~l |
         L1. |         0
dem_iraq_web |
         L1. |         0
GOP_iraq_web |
         L1. |         0
-------------+--------------------------------------------------------
  media_iraq |
         L1. |         0

.. xtsum `v' if tin(2007m9, 2008m3)

Variable | Mean Std. Dev. Min Max | Observations -----------------+-------------------------------------------- +---------------- war overall | .267915 .4429042 0 1 | N = 7103 between | .4429042 0 1 | n = 7103 within | 0 .267915 .267915 | T = 1
                 |                                            |
income overall | 5.578253 2.273915 1 11 | N = 6447 between | 2.273915 1 11 | n = 6447 within | 0 5.578253 5.578253 | T = 1
                 |                                            |
male overall | .4971139 .5000269 0 1 | N = 7103 between | .5000269 0 1 | n = 7103 within | 0 .4971139 .4971139 | T = 1
                 |                                            |
PID overall | .0900233 .9608538 -1 1 | N = 6876 between | .9608538 -1 1 | n = 6876 within | 0 .0900233 .0900233 | T = 1
                 |                                            |
educat~n overall | 6.664637 1.437452 1 8 | N = 7061 between | 1.437452 1 8 | n = 7061 within | 0 6.664637 6.664637 | T = 1
                 |                                            |
L.war_~s overall | . . . . | N = 0 between | . . . | n = 0 within | . . . | T = .
                 |                                            |
L.dem_.. overall | . . . . | N = 0 between | . . . | n = 0 within | . . . | T = .
                 |                                            |
L.GOP_.. overall | . . . . | N = 0 between | . . . | n = 0 within | . . . | T = .
                 |                                            |
L.dem_.. overall | . . . . | N = 0 between | . . . | n = 0 within | . . . | T = .
                 |                                            |
L.GOP_.. overall | . . . . | N = 0 between | . . . | n = 0 within | . . . | T = .
                 |                                            |
L.medi~q overall | . . . . | N = 0 between | . . . | n = 0 within | . . . | T = .

.. reg `v' if tin(2007m9, 2008m3)
no observations
r(2000);

Regards,
Mark
*
*   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–2024 StataCorp LLC   |   Terms of use   |   Privacy   |   Contact us   |   What's new   |   Site index