#Načítanie dát Yt <- c(6.1, 7.3, 9.6, 10.2, 10.1, 11.3, 12.2, 12.5, 13.2) Pt <- c(103, 102, 100, 94, 98, 97, 98, 97, 96) It <- c(110, 114, 130, 135, 141, 152, 160, 165, 170) #AUTOKORELACIA - DurbinWatsonTest() library(car) regresia<-lm(Yt~cbind(Pt,It)) dw<-durbinWatsonTest(regresia,max.lag=2) dw #AUTOKORELACIA - dwtest() #library(lmtest) dwtest(Yt~cbind(Pt,It),alternative=c("greater","two.sided","less")) #ODSTRANENIE AUTOKORELACIE - Cochrane-Orcutt regresia<-lm(Yt~Pt+It) library(orcutt) reg2<-cochrane.orcutt(regresia) reg2 #ODSTRANENIE AUTOKORELACIE - gls library(nlme) gls(Yt~Pt+It)