Exercises and Projects for The Little SAS Book, Sixth Edition. Lora D. Delwiche
Чтение книги онлайн.
Читать онлайн книгу Exercises and Projects for The Little SAS Book, Sixth Edition - Lora D. Delwiche страница 12
‘New Mexico’,’Utah’,’Wyoming’)
THEN Region = ‘Mountain’;
PopDiff = Pop2010 - Pop2000;
IF Region = ‘Mountain’;
RUN;
33. In the following code, the observations will have a value of missing for the variable HeightCM. Explain why, and how to fix this problem.
DATA femaleheight;
SET height;
IF Gender = ‘Female’ THEN OUTPUT;
HeightCM = HeightIN * 2.54;
RUN;
34. In the following code, the data for the 7th, 14th, 21st, and 28th observations in the DETAIL data set are very similar to the resulting observations in the SUMMARY data set. Explain any differences for these observations between the two data sets and why these differences occur.
DATA summary detail;
DO Weeks = 1 TO 4;
DO Days = 1 TO 7;
Count + 1;
OUTPUT detail;
END;
OUTPUT summary;
END;
RUN;
35. Explain the difference between a DO statement and an iterative DO statement.
36. In the following code, you were expecting the data set TALLY to have 10 observations, but instead no observations were written. Explain why, and how to fix this problem.
DATA tally;
Sum = 0;
DO WHILE (Sum >= 10);
Sum + 1;
OUTPUT;
END;
RUN;
37. Explain why it is useful to use a date format when working with SAS dates.
Конец ознакомительного фрагмента.
Текст предоставлен ООО «ЛитРес».
Прочитайте эту книгу целиком, купив полную легальную версию на ЛитРес.
Безопасно оплатить книгу можно банковской картой Visa, MasterCard, Maestro, со счета мобильного телефона, с платежного терминала, в салоне МТС или Связной, через PayPal, WebMoney, Яндекс.Деньги, QIWI Кошелек, бонусными картами или другим удобным Вам способом.