X-11 and Panel data

Questions and discussions on Time Series Analysis
cyang0922
Posts: 2
Joined: Wed Jul 08, 2020 1:45 am

X-11 and Panel data

Unread post by cyang0922 »

Hi Tom,

How can I perform a seasonal adjustment on a panel data set with 29 economies from 2002:Q1-2019:Q4 using the X11 command?
I've tried the following code:

Code: Select all

cal(panelobs=72, q) 2002:1
data(format=xls,org=columns,sheet="data") 1//2002:1 29//2019:4 rgdp

do i=1,29
x11(mode=mult,adjusted=sa_rgdp,factors=fact_rgdp) rgdp i//2002:1 i//2019:4
end do
But that doesn't seem to work at all. I still receive error message X1101, which means that X11 can take monthly or quarterly series only.
TomDoan
Posts: 7814
Joined: Wed Nov 01, 2006 4:36 pm

Re: X-11 and Panel data

Unread post by TomDoan »

You have to copy it into straight quarterly data series and then re-form the output series:

Code: Select all

cal(panelobs=72, q) 2002:1
data(format=xls,org=columns,sheet="data") 1//2002:1 29//2019:4 rgdp

dec vect[series] rgdps(29) sa_rgdps(29) fact_rgdps(29)
do i=1,29
   move rgdp i//2002:1 i//2019:4 rgdps(i) 1
end do i
cal(q) 2002:1
do i=1,29
   x11(mode=mult,adjusted=sa_rgdps(i),factors=fact_rgdps(i)) rgdps(i) 2002:1 2019:4
end do i
pform sa_rgdp
# sa_rgdps
pform fact_rgdp
# fact_rgdps
cal(panelobs=72, q) 2002:1
cyang0922
Posts: 2
Joined: Wed Jul 08, 2020 1:45 am

Re: X-11 and Panel data

Unread post by cyang0922 »

Thank you, Tom. This is extremely helpful.
Post Reply