Help with a dickey-fuller test

Greetings everyone! So, basically I have an assignment I'm doing right now which consists of data about the quarterly GDP in the USA for a period of 60 years. I need to perform an appropriate Dickey-Fuller test (none, drift or trend) on the growth rates series. Here is what I have done by now, code-wise:


gdpFull <- xts(data$gdp, timeIndex)

growthSeries <- log(gdpFull) - log(lag(gdpFull, k = 4))

growthrateSeries<-xts(growthSeries,order.by = timeIndex)

growthrateSeries1<-na.omit(growthrateSeries)

summary(ur.df(growthrateSeries1, selectlags = "Fixed", lags = 0, type = "trend"))

summary(ur.df(growthrateSeries1, selectlags = "Fixed", lags = 0, type = "none"))

summary(ur.df(growthrateSeries1, selectlags = "Fixed", lags = 0, type = "drift"))

adf.test(growthrateSeries1, k=4)

```{r}

I have been using my book but I feel like I'm missing something important. Am I on the correct path? What do I miss if I miss anything? Thanks in advance!

This topic was automatically closed 21 days after the last reply. New replies are no longer allowed.

If you have a query related to it or one of the replies, start a new topic and refer back with a link.