Professional Documents
Culture Documents
Load Data
load(choose())
load("C:\\Users\\win10\\Downloads\\tsa3.rda")
2. Plot 1
plot(data, type="o", ylab="nama variabel y")
plot(testts, type="o", ylab="growth")
3. Plot 2
plot(data, ylab="nama variabel y")
plot(testts, ylab="growth")
4. Plot 3
plot(data)
plot(testts)
5. Partiisi Grafik
par(mfrow = c(jumlah baris grafik,jumlah kolo grafik))
par(mfrow = c(2,1))
plot(data, ylab="", xlab="", main="Judul grafik")
plot(soi, ylab="", xlab="", main="Southern Oscillation Index")
plot(rec, ylab="", xlab="", main="Recruitment")
8. Error
9. Error
10. Random Walk with Drift
set.seed(???) # so you can reproduce the results
set.seed(154)
w = rnorm(jumlah data,nilai drift ,2 ); x = cumsum(data yan ingin dibuat kumulatif) #
two commands in one line
w = rnorm(200,0,1); x = cumsum(w)
wd = w +.2; xd = cumsum(wd)
plot.ts(xd, ylim=c(batas bawah,batas atas), main="random walk")
plot.ts(xd, ylim=c(-5,55), main="random walk")
lines(x); lines(.2*(1:200), lty="dashed")