Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # Taller 1 Fabián Ramírez
- # Defino un ruido blanco
- par(mfrow=c(2,2)); #divido el grafico en 2x2
- Serie1=rnorm(500,0,1);
- Serie2=rnorm(500,0,0.1);
- Serie3=rnorm(500,0,10);
- Serie4=rnorm(500,0,100);
- ts.plot(Serie1,main="N(0,1)",xlim = c(0,500), ylim =c(-50,50),col="blue");
- ts.plot(Serie2,main="N(0,0.1)",xlim = c(0,500), ylim =c(-50,50),col="red");
- ts.plot(Serie3,main="N(0,10)",xlim = c(0,500), ylim =c(-50,50),col="green");
- ts.plot(Serie4,main="N(0,100)",xlim = c(0,500), ylim =c(-50,50),col="yellow");
- # Defino una tendencia
- a = 5;
- b = 10;
- x = seq(1:500);
- Tendencia = a + b*x;
- # Defino un ruido blanco con tendencia
- X1 = Tendencia + Serie1;
- X2 = Tendencia + Serie2;
- X3 = Tendencia + Serie3;
- X4 = Tendencia + Serie4;
- par(mfrow=c(2,2)); #divido el grafico en 2x2
- ts.plot(X1,main="N(0,1)",xlim = c(0,500), ylim =c(0,5000),col="blue");
- ts.plot(X2,main="N(0,0.1)",xlim = c(0,500), ylim =c(0,5000),col="red");
- ts.plot(X3,main="N(0,10)",xlim = c(0,500), ylim =c(0,5000),col="green");
- ts.plot(X4,main="N(0,100)",xlim = c(0,500), ylim =c(0,5000),col="yellow");
- # Defino una nueva forma de tendencia
- Y1 = Tendencia * Serie1;
- Y2 = Tendencia * Serie2;
- Y3 = Tendencia * Serie3;
- Y4 = Tendencia * Serie4;
- par(mfrow=c(2,2)); #divido el grafico en 2x2
- ts.plot(Y1,main="N(0,1)",col="blue");
- ts.plot(Y2,main="N(0,0.1)",col="red");
- ts.plot(Y3,main="N(0,10)",col="green");
- ts.plot(Y4,main="N(0,100)",col="yellow");
- # Defino una nueva forma de tendencia
- Z1 = Tendencia / Serie1;
- Z2 = Tendencia / Serie2;
- Z3 = Tendencia / Serie3;
- Z4 = Tendencia / Serie4;
- par(mfrow=c(2,2)); #divido el grafico en 2x2
- ts.plot(Z1,main="N(0,1)",col="blue");
- ts.plot(Z2,main="N(0,0.1)",col="red");
- ts.plot(Z3,main="N(0,10)",col="green");
- ts.plot(Z4,main="N(0,100)",col="yellow");
- # Hacer 1 partido en el anterior
- par(mfrow=c(2,2)); #divido el grafico en 2x2
- ts.plot(1/Z1,main="N(0,1)",col="blue");
- ts.plot(1/Z2,main="N(0,0.1)",col="red");
- ts.plot(1/Z3,main="N(0,10)",col="green");
- ts.plot(1/Z4,main="N(0,100)",col="yellow");
- # Hacer un ciclo
- # Hacer un vector de senos
- hola = seq(1:500);
- for(i in 1:500){
- hola[i] = sin(i);
- };
- W1 = Serie1 + 4*hola;
- W2 = Serie1 + 4*hola;
- W3 = Serie1 + 4*hola;
- W4 = Serie1 + 4*hola;
- ts.plot(W1,main="N(0,1)",col="blue");
- ts.plot(W2,main="N(0,0.1)",col="red");
- ts.plot(W3,main="N(0,10)",col="green");
- ts.plot(W4,main="N(0,100)",col="yellow");
- # Tarea buscar datos y una serie de la vida real y exponerla ts.plot
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement