/*************Lab Assignment - Day 2***************** * Created on: January 11, 2004 * Created by: Meghan Warren * Answer Key for lab assignment 2 *****************************************************/ *1. Input the following SES_BP2 data; data SES_BP2; infile datalines; input id sex $ age sbp educ inc; datalines; 8 M 31 120 16 34 9 F 46 152 12 21 10 F 52 135 22 78 11 F 37 131 11 64 12 M 24 161 18 19 13 F 51 122 12 99 ; run; title 'Lab Assignment 2 data'; *checking data that is input; proc print data = SES_BP2; run; proc contents data = SES_BP2; run;

data temp1 (label = 'SES_BP2'); /*4. label the entire data set SES_BP2*/ set SES_BP2; *2. Create/generate a new variable called "HT", make it equal to one if SBP is greater than 130, and zero otherwise; if SBP gt 130 then HT = 1; else HT = 0; *3. Label the variables; label id = 'Subject ID' sex = 'Sex of Subject' age = 'Age at Interview' SBP = 'Sytolic Blood Pressure' EDUC = 'Educational Attainment' inc = 'Hohusehold Income/annum' HT = 'Hypertensive (0,1)'; run; title2 'Data set changed with labels and hypertension'; proc print data = temp1 label; /*using the label option in the proc print will show the labels you created*/ run; proc contents data = temp1; run; *Create subsets of:

1. 2. 3. 4.

ID equals 8,9, or 10 Only females Age is less than 50 and education is greater than 12 All non-hypertensives;

*ID equals 8, 9, and 10; data id_sub; set temp1; if id in (8,9,10); run; title2 'Includes only ID 8, 9, or 10'; proc print data = id_sub label; run; *Only females; data females; set temp1; where sex = 'F'; /*you can use if or where interchangeably to subset you data set*/ run; title2 'Includes only females'; proc print data = females label; run; *Age is les than 50 and education is greater than 12; data age_educ; set temp1; if age lt 50 and educ > 12; run; title2 'Includes age less than 50 and educational attainment greater than 12'; proc print data = age_educ label; run; *Non-hypertensives; data non_ht; set temp1; if ht = 0; run; title2 'Includes non-hypertensives'; proc print data = non_ht label; run;

Lab 2 Answer Key.pdf

Page 1 of 2. /*************Lab Assignment - Day 2*****************. * Created on: January 11, 2004. * Created by: Meghan Warren. * Answer Key for lab assignment 2 ... run;. Page 2 of 2. Lab 2 Answer Key.pdf. Lab 2 Answer Key.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Lab 2 Answer Key.pdf. Page 1 of 2.

20KB Sizes 2 Downloads 141 Views

Recommend Documents

Lab 3 Answer Key.pdf
*this will create a cross-tabulation table;. proc freq data ... to have only two decimal places;. title2 'Showing the ratio ... Lab 3 Answer Key.pdf. Lab 3 Answer Key.

Introduction to Lab 2
Sep 15, 2010 - http://www.it.uu.se/edu/course/homepage/realtid/ht10/lab2. Lab report ... Based on OSEK (industry standard for automotive embedded systems).

Grades K-2: Code Lab
ISTE 2016: Students develop and employ strategies for understanding and solving problems in ways ... your directions using words the computer can understand. ... Go to the Code Lab game on the Santa Tracker website: https://santatracker.

Introduction to Lab 2 (LEGO)
Sep 15, 2010 - Flash the custom firmware ... Custom FW using fwflash-jh. ▻ Original FW using fwflash- .... Application: Distance and touch sensor sensing. 1.

Grades K-2: Code Lab
How can you use code to help someone move through a maze? 1. Coding is kind of like giving directions. When you code, you tell a computer to follow.

2 Answer Key.pdf
Page 3 of 35. Answer Key. -30 -. Answer Key. Songsheets. Module 1 Exercise 1 (p. 111(T)). (Suggested Answer). I wake up. I get dressed. I eat breakfast. I take the bus to school. I go to classes. I go home from school. I do my homework. I watch TV. I

Lab Equipment Batch 2.pdf
Lab Equipment Batch 2.pdf. Lab Equipment Batch 2.pdf. Open. Extract. Open with. Sign In. Main menu. Displaying Lab Equipment Batch 2.pdf. Page 1 of 3.

Galileo 2 Lab F13.pdf
G. What would your speed-time graph look like if you increased the angle of the ramp? H. Would the slope value change? If so, how? Teacher Check In ...

LAB 2 MATE I.pdf
Loading… Whoops! There was a problem loading more pages. Retrying... Whoops! There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. LAB 2 MATE I.pdf. LAB 2 MATE

paper-2-code-2-answer-key.pdf
Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. paper-2-code-2-answer-key.pdf. paper-2-code-2-answer-key.pdf.

pape 2 answer key.pdf
work function 1eV. The maximum kinetic energy. of emitted photoelectron is : (A) leV (B) 2eV. (C) 3eV (D) 4eV. 003. A light beam parallel to axis is incident on. the system of four convex lenses A, B, C and. D. Focal lengths of ... (C) namdV©Z (D) {

Phase - 2 Collection of Answer Scripts for Even Semester (Regular ...
Phase - 2 Collection of Answer Scripts for Even Semester (Regular & Back) Examinations 2017-18.pdf. Phase - 2 Collection of Answer Scripts for Even Semester (Regular & Back) Examinations 2017-18.pdf. Open. Extract. Open with. Sign In. Main menu. Disp

Phase 2 - Submission of Answer Scripts for Regular & Back ...
There was a problem previewing this document. Retrying... Download. Connect more apps... Try one of the apps below to open or edit this item. Phase 2 - Submission of Answer Scripts for Regular & Back Examination 2017-18.pdf. Phase 2 - Submission of A

Phase 2 - Collection of Answer Scripts for Odd Semester (Regular ...
Download. Connect more apps... Try one of the apps below to open or edit this item. Phase 2 - Collection of Answer Scripts for Odd Semester (Regular & Back) Examination - 2017-18.pdf. Phase 2 - Collection of Answer Scripts for Odd Semester (Regular &