Announcement

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

  • r(2000) with all numeric observations

    Hi i am trying to run a time series analysis in Stata 12.0 but the r(2000) is the only thing get!!

    i searched in many forums and nothing is helping.

    my variable is not a string and has no missing values here it is


    . describe(p1)

    storage display value
    variable name type format label variable label
    -----------------------------------------------------------------------------------------
    p1 double %10.0g p1

    . sum(p1)

    Variable | Obs Mean Std. Dev. Min Max
    -------------+--------------------------------------------------------
    p1 | 145 5.165996 .4178336 4.531062 6.009164

    . count if missing(p1)
    0

    . count if !missing(p1)
    145


    . destring p1, replace
    p1 already numeric; no replace

    . tsset data1, daily
    time variable: data1, Dec-94 to Dec-06, but with gaps
    delta: 1 day

    . dfuller p1, lags(1)
    no observations
    r(2000);

    I guess the problem is the original data from excel, all the Stata examples work fine, only my data does not.
    and i do not know the difference between count missing and !missing.

    Thanks to anyone who help.


  • #2
    I guess you're looking in the wrong place. There is no evidence that the data's residence in MS Excel has corrupted them. (Why is the incorrect spelling "excel" so common?)

    dfuller is reacting to the gaps, which mean it has nothing to work with.

    It seems that you may have monthly data that you are declaring as daily.

    Show us the result of (e.g.)

    Code:
     
    describe data1 
    summarize data1 
    list data1 in 1/10
    .

    (data1 is also an odd name for a time variable, but that's still legal.)

    Comment


    • #3
      i have problem same as jose simi heres mine :

      describe Date

      storage display value
      variable name type format label vari
      > able label
      --------------------------------------------------
      Date int %td Date


      summarize Date

      Variable | Obs Mean Std. Dev.
      > Min Max
      -------------+------------------------------------
      > --------------------
      Date | 62 19190.53 549.2528
      > 18263 20120

      .
      . list Date in 1/10

      +-----------+
      | Date |
      |-----------|
      1. | 01jan2010 |
      2. | 01feb2010 |
      3. | 01mar2010 |
      4. | 01apr2010 |
      5. | 01may2010 |
      |-----------|
      6. | 01jun2010 |
      7. | 01jul2010 |
      8. | 01aug2010 |
      9. | 01sep2010 |
      10. | 01oct2010 |
      +-----------+

      .
      And yes i declare daily on my monthly data. but it seems wont work on dfuller even i declare my data as monthly. could you help me?

      Thanks,

      Comment


      • #4
        If you declare monthly data as daily,

        1. That's a very puzzling thing to do.

        2. Stata can only view your dataset as mostly gaps.

        To understand how to work with dates and times in Stata, there is really no good substitute for reading help dates and times.

        You can get the corresponding monthly date with (e.g.)

        Code:
         
        gen mdate = mofd(date) 
        format mdate %tm
        and then tsset or xtset in terms of mdate (and your panel identifier if you have one).

        Comment

        Working...
        X