The following DATA step attempts to create a SAS dataset that contains information from Nevada 2017 County Health Rankings and Roadmaps. data healthrank;State = 'Nevada';Fipscode =...

I need assistance with SAS assignment


The following DATA step attempts to crea te a SAS dataset that contains information from Nevada 2017 County Health Rankings and Roadmaps. data healthrank; State = 'Nevada'; Fipscode = '32000' PercentPoorHealth = 17; PercentLBW = '8'; run; a) Copy the preceding program into the SAS editor and submit it. Review the information in the SAS log. i. Identify and state below the number of error(s) produced by this program. Copy and paste the SAS log here to show these error(s). Do not include any SAS start-up messages. (1 point) ii. Identify and state below the number of notes produced by this program. Copy and paste the SAS log here to show these notes. Do not include any SAS start-up messages. (1.5 points) iii. Identify and state below the warning produced by this program. Paste the SAS log here to show the warning. Do not include any SAS start-up messages. (1 point) Revise the program to fix the programming mistakes and then resubmit the revised SAS program. Copy and paste your revised SAS program and the SAS log here. (1 point) c) Looking at the “NOTES” in the SAS log from question 1b, how many observations and variables were created in this dataset? (1 point) 2. The body mass index (BMI) is a measure used as a rough indicator of an individual’s body fat. The following program computes BMI using weight (in pounds) and height (in inches). /********************************************************* Compute body mass index using pounds and inches The two asterisks are used to square (height squared) In SAS, a single asterisk means multiply. Two asterisks means the values are squared. *********************************************************/ data bodymass; weight = 150; height = 68; bmi = (weight / height ** 2) * 703; run; a) Copy and paste the preceding program into the SAS editor and submit it. Copy and paste the SAS program and log here. (1 point) b) The program in question a) creates a SAS dataset named BODYMASS in SAS Work library. View the data set. Find the value that was calculated for the BMI variable andrecord this value as a comment in your SAS program. Paste your commented SAS program here. (1 point) c) View the properties of this data set. Find the types and lengths for the variables and record them as comments in your program. Paste your commented SAS program here. (1.5 points) Note: To view the properties, go to the SAS Explorer Work bodymass right click on the bodymass dataset properties Columns tab d) Choose different values for the weight and height variables for the SAS program. Add a PROC PRINT statement to print the BODYMASS data set. Submit the revised SAS program. Include a title for the PROC PRINT. Copy and paste here the data step and PROC PRINT SAS programs, the data step and PROC PRINT SAS log, and PROC PRINT table. (2 points) 3) Following is data for five students and their homework scores. Fname Lname ID homewk1 homewk2 John Smith NV111 8 7 Mary Johnson IL222 9 7 Mark Miller UT333 10 8 Jay Chavez K444 6 10 Cynthia Ragan CA555 10 10 a) i. Create a SAS data file with the preceding data using the INPUT statement. Copy and paste here the SAS program and SAS log. (2 points) ii. Use PROC PRINT to print the dataset in question a I above. Include two titles on the PROC PRINT output. Copy and paste here the SAS program and SAS log. (2 points) b) Develop a SAS program to create a SAS library named “CHS762”. Paste your SAS program and log here. (2 points) c) i. Use the INFILE statement to import the “County1.txt” text data file. The County1 text file has the following four variables: ID, RACE, AGE, AND COUNTY. Copy and paste the SAS program and SAS log here. (2 points) Note: The county1.txt file is tab-delimited. Refer to the example on program 4 in the “UNR CHS 762 reading data into SAS sample program” SAS program. ii. Save the imported data as a permanent data file in the CHS762 library. Copy and paste the SAS program and SAS log here. (1 point) iii. Use PROC PRINT to print the data you imported. Copy and paste the SAS program, SAS log, and PROC PRINT table here. (2 points) d) Include any two comments in the SAS program, in question 3 c, that provide information about the SAS program. Copy and paste here the SAS program with the comments. (1 point) 4) The csv data file “student1” contains information about students at a Western college. The variables in the file are IDS, MAJOR, HEIGHT, ENGLISH, and STATE. a) Import the csv data file “student1” into SAS. Copy and paste here the SAS program and log. (2 points) b) Use PROC MEANS to compute the mean height and mean English score (variable names “height” and “English”). Use a PROC MEANS option so that the values on the PROC PRINT have zero decimal places. Copy and paste the SAS program, SAS log, and PROC MEANS table here. (2 points) c) Add SAS statements that will output the PROC MEANS results from question 4b as a PDF file. Include a title and a footnote in the output. Copy and paste the SAS program and log here. Upload on Canvas the PDF file with this assignment. (2 points) d) Use a one-way PROC FREQ to compute the number of students who were in-state and out of state (variable name is STATE). Use PROC FREQ options such that there is no cumulative frequency. Copy and paste the SAS program, log, and PROC FREQ table here. (2 points) e) Add SAS statements that will output the one-way frequency table in question 4d as an Excel file. Include a title and a footnote in the output. Copy and paste the SAS program and log here. Upload on Canvas the Excel file with this assignment. (2 points) Note: The following message will appear when you click on the open the Excel file. Ignore the message and open the Excel file by clicking “Yes”. ) Use a two-way PROC FREQ to compute the number of students by major and state (variable names MAJOR and STATE respectively). Use PROC FREQ options such that there is no percent, row percent, or column percent on the table. Copy and paste the SAS program and log here. (2 points) g) Add SAS statements that will output the two-way frequency table in question 4f as a RTF file. Include a title and a footnote in the output. Copy and paste the SAS program and log here. Upload on Canvas the RTF file with this assignment. (2 points) 30Hispanic22Clark 17Asian17Washoe 4White32Nye 20Black82Carson 25Alaskan65Lyon 14White72Clark
Feb 12, 2023
SOLUTION.PDF

Get Answer To This Question

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here