Chat with us, powered by LiveChat Analysis - Categorical and Continuous Variables - STUDENT SOLUTION USA

If you have not already, install R Commander by viewing the instructions below 

This software is free to download and use and works best with a PC versus a Mac. If you use a Mac, you can find instructions inside your textbook. You cannot use a Chromebook.

1. Download the data files found in Appendix B of your White Textbook. These can be found on the student resources website by using the access code provided in either your Vital Source Bookshelf or inside the front cover of your hard copy.

2. Download R Commander. The instructions can be found in Appendix B and is also demonstrated in this video: https://www.youtube.com/watch?v=BveZtZx3QhE

3. Import data files as you need them (you do not need to import all files). These instructions are also in Appendix B.

Part 1 Action Items for Analysis – Categorical Variables

  1. Review the reading materials in . – See Attached file 
  2. Open R.
  3. Type: library(Rcmdr).
  4. Once R Commander opens, go to Data > Import data > from Excel file.
  5. Click OK and select the CHF Data.xlsx file
  6. Select the Data tab.
  7. Create a frequency distribution for the following variables:
    • Admission Source
    • Gender
    • Discharge Status
    • Age Category
    • Number of Diagnosis Codes
  8. All frequency distributions follow the same steps:
    1. Go to Statistics > Summaries > Frequency distribution
    2. Select variables
      1. Note that some variables may not appear in the list. R will only display categorical variables in the selection window. To let R know that other number variables are actually categories or factors, go to Data > Manage variables in active data set > Convert numeric variables to factors
      2. Select variables in the listing above (hold the Ctrl key to select multiple variables)
      3. Select the Use Numbers radio button and click OK
      4. The variables should now appear in the frequency

Part 2 Action Items for Analysis – Continuous Variables

  1. Review the reading materials in  – See Attached file 
  2. Upload the CHF file in R Commander.

Central Tendency

  • Calculate the mean, median and mode LOS.
  • Calculate the mean, median and mode LOS excluding the maximum value.
  • Did the mean, median and mode change more? Why?
  • What do you think is the best statistic to describe the typical:
    • LOS
    • Admission source
    • Gender

Spread

  1. Calculate the variance and range LOS.
  2. Calculate the variance and range LOS excluding the maximum value.
  3. Did the variance and range mean or median change more? Why?
  4. By Sunday, upload your completed assignment.

R Commander Tips

Mean and median

  1. Go to Statistics > Summaries > Numerical Summaries
  2. Select LOS in the Variables window
  3. Click on Statistics and select Mean and Quantiles

Mode R does not have a built-in function for mode, but the following steps may be used to depict the mode using a bar chart:

  1. Go to Data > Manage variables in active dataset > Convert numeric variables to factors
  2. Select LOS in the Variables window and Use numbers as the Factor levels. Use factor_LOS as the new variable name:
    1. Go to Graphs > Bar graph
    2. Select factor_LOS in the Variable window
    3. Click OK
error: Content is protected !!