You are on page 1of 5

1.

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")

6. Plot Time Series


par(mfrow=c(2,1), mar=c(bawah,kiri,atas,kanan)+.5, mgp=c(ylim,jarak nomor,jarak
garis))
par(mfrow=c(2,1), mar=c(3,2,1,0)+.5, mgp=c(1.6,.6,0))
ts.plot(fmri1[,2:5<data yangdiplihke2-5>], lty=c(1,2,4,5<modelgarisdata1-4bisa lebih>),
ylab="BOLD", xlab="", main="Cortex")
ts.plot(fmri1[,2:5], lty=c(1,2,4,5), ylab="BOLD", xlab="", main="Cortex")
ts.plot(fmri1[,6:9], lty=c(1,2,4,5), ylab="BOLD", xlab="", main="Thalamus &
Cerebellum")
mtext("Time (Judul tampilan)", side=nomor tempat, line=urutan tempat tampilan)
mtext("Time (1 pt = 2 sec)", side=1, line=2)
7. Plot data dan judulnya
par(mfrow=c(2,1))
plot(EQ5, main="Earthquake")
plot(EXP6, main="Explosion")

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")

11. Signal in Noise


cs = 2*cos(2*pi*1:500/50 + .6*pi)
w = rnorm(500,0,1)
par(mfrow=c(3,1), mar=c(3,2,2,1), cex.main=ukuran judul)
par(mfrow=c(3,1), mar=c(3,2,2,1), cex.main=1.5)
plot.ts(cs, main=expression<untuk baca simbol>(2*cos(2*pi*t/50+.6*pi)))
plot.ts(cs, main=expression(2*cos(2*pi*t/50+.6*pi)))
plot.ts(cs+w, main=expression(2*cos(2*pi*t/50+.6*pi) + N(0,1)))
plot.ts(cs+5*w, main=expression(2*cos(2*pi*t/50+.6*pi) + N(0,25)))
12.

You might also like