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
- Review the reading materials in . – See Attached file
- Open R.
- Type: library(Rcmdr).
- Once R Commander opens, go to Data > Import data > from Excel file.
- Click OK and select the CHF Data.xlsx file
- Select the Data tab.
- Create a frequency distribution for the following variables:
- Admission Source
- Gender
- Discharge Status
- Age Category
- Number of Diagnosis Codes
- All frequency distributions follow the same steps:
- Go to Statistics > Summaries > Frequency distribution
- Select variables
- 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
- Select variables in the listing above (hold the Ctrl key to select multiple variables)
- Select the Use Numbers radio button and click OK
- The variables should now appear in the frequency
Part 2 Action Items for Analysis – Continuous Variables
- Review the reading materials in – See Attached file
- 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
- Calculate the variance and range LOS.
- Calculate the variance and range LOS excluding the maximum value.
- Did the variance and range mean or median change more? Why?
- By Sunday, upload your completed assignment.
R Commander Tips
Mean and median
- Go to Statistics > Summaries > Numerical Summaries
- Select LOS in the Variables window
- 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:
- Go to Data > Manage variables in active dataset > Convert numeric variables to factors
- Select LOS in the Variables window and Use numbers as the Factor levels. Use factor_LOS as the new variable name:
- Go to Graphs > Bar graph
- Select factor_LOS in the Variable window
- Click OK