Deseasonalize PIM data with R

Asked

Viewed 101 times

0

I’ll start by saying that I’m almost illiterate in programming so have a little patience.

I am trying to deseasolize the historical series of PIM by r according to the IBGE instructions, for this I am using the X13 package. The problem is that even running according to the instructions, my result never matches the IBGE, example of programming:

fumob <-read.csv2("fumo.csv") #SEMPRE VERIFICAR SE A SEPARAÇÃO É PONTO OU VIRGULA
fumo.ts<-ts(fumob,start=c(2002,1),freq=12) #A BASE ORIGINAL NÃO PODE TER DATAS
fumo.ts

fumosa <- seas(x = fumo.ts, arima.model = "(1 0 0)(0 1 1)", transform.function = "none",
               automdl = NULL, regression.aictest = NULL)

In this case the basis was "Tobacco Products" that IBGE specifies only one ARIMA model (1 0 0)(0 1 1) and no other detail. I tried to put and take the Trading Days, no way the result is close.

Has anyone ever messed with these seasonalizations by r? Could you help me?

1 answer

0

In Tobacco Products, the type of decomposition that appears in the methodological note is "Multiplicative", so Transform.Function is "log". In addition, you have to add the parameter "outlier.types = "all"".

Browser other questions tagged

You are not signed in. Login or sign up in order to post.