You are on page 1of 7

TAREA 1

JJ
1. Investigue como importar archivos de Excel a SAS e importe el archivo de datos
autos.xls

PROC IMPORT OUT=AUTOS

DATAFILE='/home/u63343027/tar2/autos.xls'

DBMS=XLS

REPLACE;

RUN;

PROC PRINT DATA=AUTOS;

RUN;

Obs Miles Engine Horse Weight Acceleration Model Country Number of


Per Size powers in (0 to 60) Year of Origin Cylinders
Gallon (cube pounds
in)

1 18 307 130 3504 12 70 1 8

2 15 350 165 3693 12 70 1 8

3 18 318 150 3436 11 70 1 8

4 16 304 150 3433 12 70 1 8

5 17 302 140 3449 11 70 1 8

6 15 429 198 4341 10 70 1 8

7 14 454 220 4354 9 70 1 8

8 14 440 215 4312 9 70 1 8

9 14 455 225 4425 10 70 1 8

10 15 390 190 3850 9 70 1 8

11 15 383 170 3563 10 70 1 8


Obs Miles Engine Horse Weight Acceleration Model Country Number of
Per Size powers in (0 to 60) Year of Origin Cylinders
Gallon (cube pounds
in)

12 14 340 160 3609 8 70 1 8

13 15 400 150 3761 10 70 1 8

14 14 455 225 3086 10 70 1 8

15 24 113 95 2372 15 70 3 4

16 22 198 95 2833 16 70 1 6

17 18 199 97 2774 16 70 1 6

18 21 200 85 2587 16 70 1 6

19 27 97 88 2130 15 70 3 4

20 26 97 46 1835 21 70 2 4

21 25 110 87 2672 18 70 2 4

22 24 107 90 2430 15 70 2 4

23 25 104 95 2375 18 70 2 4

24 26 121 113 2234 13 70 2 4

25 21 199 90 2648 15 70 1 6

26 10 360 215 4615 14 70 1 8

27 10 307 200 4376 15 70 1 8

28 11 318 210 4382 14 70 1 8

29 9 4 93 732 9 0 . .

30 27 97 88 2130 15 71 3 4
Obs Miles Engine Horse Weight Acceleration Model Country Number of
Per Size powers in (0 to 60) Year of Origin Cylinders
Gallon (cube pounds
in)

31 28 140 90 2264 16 71 1 4

32 25 113 95 2228 14 71 3 4

33 25 98 . 2046 19 71 1 4

34 19 232 100 2634 13 71 1 6

35 16 225 105 3439 16 71 1 6

36 17 250 100 3329 16 71 1 6

37 19 250 88 3302 16 71 1 6

38 18 232 100 3288 16 71 1 6

39 14 350 165 4209 12 71 1 8

40 14 400 175 4464 12 71 1 8

41 14 351 153 4154 14 71 1 8

42 14 318 150 4096 13 71 1 8

43 12 383 180 4955 12 71 1 8

44 13 400 170 4746 12 71 1 8

45 13 400 175 5140 12 71 1 8

46 18 258 110 2962 14 71 1 6

47 22 140 72 2408 19 71 1 4

48 19 250 100 3282 15 71 1 6

49 18 250 88 3139 15 71 1 6

50 23 122 86 2220 14 71 1 4
Obs Miles Engine Horse Weight Acceleration Model Country Number of
Per Size powers in (0 to 60) Year of Origin Cylinders
Gallon (cube pounds
in)

51 28 116 90 2123 14 71 2 4

52 30 79 70 2074 20 71 2 4

53 30 88 76 2065 15 71 2 4

54 31 71 65 1773 19 71 3 4

55 35 72 69 1613 18 71 3 4

56 27 97 60 1834 19 71 2 4

57 26 91 70 1955 21 71 1 4

58 24 113 95 2278 16 72 3 4

59 25 98 80 2126 17 72 1 4

60 23 97 54 2254 24 72 2 4

61 20 140 90 2408 20 72 1 4

62 21 122 86 2226 17 72 1 4

63 13 350 165 4274 12 72 1 8

64 14 400 175 4385 12 72 1 8

65 15 318 150 4135 14 72 1 8

66 14 351 153 4129 13 72 1 8

67 17 304 150 3672 12 72 1 8

68 11 429 208 4633 11 72 1 8

69 13 350 155 4502 14 72 1 8

70 12 350 160 4456 14 72 1 8


Obs Miles Engine Horse Weight Acceleration Model Country Number of
Per Size powers in (0 to 60) Year of Origin Cylinders
Gallon (cube pounds
in)

71 13 400 190 4422 13 72 1 8

72 19 70 97 2330 14 72 3 3

73 15 304 150 3892 13 72 1 8

74 13 307 130 4098 14 72 1 8

75 13 302 140 4294 16 72 1 8

76 14 318 150 4077 14 72 1 8

77 18 121 112 2933 15 72 2 4

78 22 121 76 2511 18 72 2 4

79 21 120 87 2979 20 72 2 4

80 26 96 69 2189 18 72 2 4

81 22 122 86 2395 16 72 1 4

82 28 97 92 2288 17 72 3 4

83 23 120 97 2506 15 72 3 4

84 28 98 80 2164 15 72 1 4

85 27 97 88 2100 17 72 3 4

86 13 350 175 4100 13 73 1 8

87 14 304 150 3672 12 73 1 8

88 13 350 145 3988 13 73 1 8

89 14 302 137 4042 15 73 1 8

90 15 318 150 3777 13 73 1 8


Obs Miles Engine Horse Weight Acceleration Model Country Number of
Per Size powers in (0 to 60) Year of Origin Cylinders
Gallon (cube pounds
in)

91 12 429 198 4952 12 73 1 8

92 13 400 150 4464 12 73 1 8

93 13 351 158 4363 13 73 1 8

94 14 318 150 4237 15 73 1 8

95 13 440 215 4735 11 73 1 8

96 12 455 225 4951 11 73 1 8

2.Genere una variable rapidez que clasifique a la variable Acelerattion en dos categorías,
a criterio personal los límites de las categorías.

3.En SAS, añadir los datos para tres vehículos más contenidos en la siguiente tabla:

4. Imprima el contenido de todos los datos (99) tomando en cuenta la generación de la


variable rapidez para el conjunto inicial y para las nuevas observaciones.
5.Ordene los datos de acuerdo a la variable Country of Origin, e imprima solamente las
Miles Per Gallon y Country of Origin.
6.Realice una tabla de frecuencias para la variable Horse Powers.
7. Muestre un resumen estadístico (estadísticas descriptivas) del conjunto de variables
8.Importe el conjunto de datoscolesterol.xls, los datos se le tomaron al azar a 70
pacientes y se les registro su Edad, Colesterol, Índice de Masa Corporal y Tensión Arterial
Diastólica, Ajuste un modelo de regresión lineal simple tomando como variable
dependiente a la tensión arterial diastólica y variable independiente al colesterol.
Verifique que el intercepto 𝛽0=27.53y la pendiente de la recta ajustada 𝛽1=0.227.
Interprete la salida de ANOVA.

Responda las siguientes preguntas.


1. ¿Cuál es la estructura general de un programa de SAS?
2. ¿Qué es un Dataset en SAS y cuáles son las áreas por las que está constituido?

You might also like