Mini-Assignment 3

Directions:

  1. Load in the HELP data set
  2. Patients with a mental component score (mcs) less than 20 are thought to be at extreme risk of returning to the detoxification unit within the next 12 months. Make a new variable called “ExtremeMCS” and code it as 1 if a patient is at risk based on his/her mcs score and 0 otherwise.
  3. Make a new variable “SuicidalThought” based off of the variable g1b. Have 1 indicate a patient has had suicidal thoughts and a 0 indicate he/she has not.
  4. Make a new variable “HomelessStatus” based off of the variable “homeless”. Have a 1 indicate that a patient is homeless and a 0 indicate he/she is housed.
  5.  Suppose we want to assess the overall risk a patient has to return to the detoxification unit and it is believed “ExtremeMCS”, “SuicidalThought”, and “HomelessStatus” are considered risk factors. Construct a new variable called ‘RiskTotal’ which computes the number of risk factors a particular patient has. That is, make it a sum of these 3 variables.
  6. Make a frequency table of ‘ExtremeMCS’, ‘SuicidalThought’, ‘RiskTotal’ and answer questions  1-3 below.

Questions:

Question 1:  How many patients are thought to be at risk based on his/her mcs score?

Question 2:  What percentage of patients have experienced suicidal thoughts? (round your answer to nearest percentage)

Question 3:  What percentage of patients in the study have fewer than 3 risk factors. (round your answer to nearest percentage)

Submit your answers in moodle under Mini-Assignment 3.