In Practice Problem in Chapter 5 in the core text (Sullivan, 2012).
Read the Framingham study data setView in a new window into R. The dataset is a subset of the data collected as part of the Framingham study and includes ID (unique identification number for each participant), sex (participant sex, 1 denotes men and 2 denotes women), age (age at exam, years), BMI (Body Mass Index, weight in kilograms/height meters squared) and SYSBP (Systolic Blood Pressure, mean of last two of three measurements in mmHg) data on 3,246 participants. NOTE: Although the dataset contains Framingham data ‘as collected’ by Framingham investigators, specific methods were employed to ensure an anonymous dataset that protects patient confidentiality; therefore, this dataset is inappropriate for publication purposes.
How would you apply what you learned in the course to describe or comment the SYSBP data in the Framingham study? (2 points)
The following R codes may help you address the question.
#Read the data into R by choosing the file interactively
proj <- read.csv(file.choose(),header=TRUE)
#Alternatively, read the data into R by specifying the path and filename,
#Please note that the backslash of a path name in Windows has a collision with a R syntax
#We have to either replace the backslashes with forward slashes or put two backslashes where there should be one
proj <- read.csv(“C:/Downloads/dataset_project_mph607.csv”,header=TRUE)
#Check whether all data have been read in
#The R output should be “ 3246 5″, which means 3246 rows and 5 columns
#Rows represent participants and columns represent variables
#For example, the first row contains the data for the subject with ID 7351212
#Obtain descriptive statistics of the variable
#Obtain the histogram of the variable
hist(proj$SYSBP, breaks=”Sturges”, col=”darkgray”)
Question 7 in Practice Problem in Chapter 5 in the core text (Sullivan, 2012).
R Core Team (2013). R: A language and environment for statistical computing. R Foundation for Statistical Computing, Vienna, Austria. URL http://www.R-project.org/.
Sullivan, L. M. (2012). Essentials of biostatistics in public health (2nd ed.). Sudbury, MA: Jones & Bartlett Learning.