본문 바로가기

분류 전체보기

(510)
Scenario 4 This scenario uses the Cert.Laguardia data set. Write a SAS program to do the following: Print the data set Cert.Laguardia sorted and grouped by Dest. Save sour sorted data set as a temporary data set, Work.Laguardia. Store the results, grouped by the variable Dest, in a PDF file named "LGA Airport.pdf" using the FestivalPrinter style with a report title, "Laguardia Flights". [사용 코드] libname cer..
Scenario 3 This scenario uses the Cert.Staff data set. Write a SAS program to do the following: Create a new temporary SAS data set that uses Cert.Staff and store th results in Work.StaffReports. Select observation where WageCategory is not equal to H. Format the variable DOB as mmddyy10. Create a new variable named Raise whose value is WageRate multiplied by 3 %. Determine the grand total of Raise for the..
Scenario 2 This scenario uses the Cert.Stree data set. Write a SAS program to do the following: Create a new temporary SAS date set uses Cert.Stress and store the results in Work.Stress1. Remove observations with RestHR values that are greater than 70. Create a new variable called TotalTime. The value of TotalTime is the value of TimeMIn multiplied by 60, plus the value of TimeSec. Romove TotalTime values ..
Scenario 1 This scenario uses the Cert.Patient and Cert.Measure data sets. Write a SAS program to do the following: Sort Cert.Patient and Cert.Measure by ID. Use the match-merging technique to combine Cert.Patient and Cert.Measure to create a new temporary data set named Work.Merge. Select observations for the patients under the age 50. Sort the new data set, Work.Merge, by Age in decending order. Save the..
SAS 관련 정리 1. 실행 단축키 : F3 2. 주석 달기 : Ctrl + / 3. Footnote statment : output 에서 아랫부분의 데이터와 상관없이 설정한 문자값을 보여주는 명령어 footnote1 'Sales Report for Last Month' footnote2 'Selected Products Only' footnote3 ~ footnote4 ~ proc print data = sasuser.shoes; footnote2 'All Products'; run; 처음에 footnote 가 1~4 까지 지정. PROC PRINT 다음에 footnote2 가 재설정 되었음. 2번이 재설정 되었으면 그 하위단계는 삭제된다. 2번이 재설정되었으므로 3~4번은 삭제되고 1~2번만 남는다. Q. Which ..
Chapter 15. Producing Descriptive Statistics Q. The default statistics produced by the MEAN procedure are n-count, mean,minimum,maximun, and which one if the following statistics: (standard deviation) By default, the MEANS procedure produces the n, mean, minimum, maximum, and standard deviation. n mean minimum maximum standard deviation Q. Which statement limits a PROC MEANS analysis to the variables Boarded, Transfer, and Deplane? - PROC ..
Chapter 16. Creating Output Q. Using ODS statements, how may types of output can you generate at once? (as many as you want) You can generate any number of output types as long as you open ODS destination for each type of output you want to create The output from a SAS program can be converted to more user friendly forms like .html or PDF. This is done by using the ODS statement available in SAS. ODS stands for output deli..
Chapter 14. Using Function to Manipulate Date Q. Within the data set Cert.Temp, PayRate is a character variable and Hours is a numeric variable. What happens when the following program is run? data work.temp ; set cert. temp; Salary = payrate * hours ; run; SAS converts the values of PayRate to numeric values. A message is written to the log. When this DATA step is executed, SAS automatically converts the character values of PayRate to nume..