inst/examples/R/stat/PeriodischeSchwankung/ZulassungszahlPKW.R

a = c(15222, 17456, 12988, 13833, 15407, 19110, 13479, 13139, 16407, 18738, 11923, 11853, 15869, 16109, 12883, 11712, 14495, 15373, 10341, 11111, 12985, 13397, 9474, 10043, 13431, 15968, 11246, 11261, 14908, 14581, 10498, 10657, 11078, 14858, 11473, 12384, 13801, 17143, 14249, 14712, 12603, 16799, 15611, 15568, 13077, 17098, 14159, 13085, 14093, 16344, 12044, 13762)
t = ts(a, start=c(1977,1), end=c(1989,4), fr=4)
plot(t, ylim=c(8000,20000), xlab="Zeit", ylab="Zulassungszahl neuer Pkw (Tsd.)", col="red", lwd=2, axes=F)
axis(1, at=seq(1977.1, 1989.4, by=1.0), label=seq(77.1, 89.4, by=1.0), lwd=2, tck=-0.02)
axis(2, at=seq(8000, 20000, by=2000), label=seq(8, 20, by=2), las=2, lwd=2, tck=-0.02)
lines(decompose(t)$trend, lwd=2)
lines(decompose(t)$trend+decompose(t)$seasonal, lwd=2, col="blue")
sigbertklinke/shinyExample documentation built on May 26, 2019, 4:32 a.m.