Announcement

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

  • CIPS unit root test to latex format

    I am running CIPS unit root test using the commands;
    gen Variable=""
    gen CIPS=.
    local i 1
    foreach var of varlist GDP Life_Expectancy Population_Growth Gross_Fixed_Capital Unemployment{
    xtcips `var',maxlag(1) bglag(1) trend
    replace Variable= subinstr("`var'","_", " ", .) in `i'
    replace CIPS = r(cips) in `i'
    local ++i
    }
    format CIPS %9.3f
    drop if missing(Variable)
    keep Variable CIPS
    list, clean
    texsave using cipsroottestlevels.tex, title(CIPS unit root test) width(5in) footnote(Source: Constructed by Author) replace

    My panel is balanced but I keep getting error "variable Variable was str1 now str3
    (1 real change made)
    (1 real change made)
    panel must be balanced
    invalid syntax
    r(198);


    Can anyone please suggest alternative commands or approach. Thank you.

  • #2
    Hi

    I just had the same situation. I have 3180 observations and my panel is strongly balanced. And I could run the command xtcips for all my variables except for one. I realized that the unsuccessed variable had 3 missing data. I could change the missing data for zeros without affecting real values and then the command works! I hope this helps

    Comment

    Working...
    X