Unit II RCH Discussion

profileMalkta
UnitIIRCHStudyguide.pdf

RCH 8303, Quantitative Data Analysis 1

Course Learning Outcomes for Unit II Upon completion of this unit, students should be able to:

1. Perform statistical tests using software tools. 1.1 Describe the procedures to report descriptive statistics of a data set. 1.2 Report normality statistics.

2. Explain results of statistical tests.

2.1 Describe the process to upload a data set into R and process the data using Rcmdr. 2.2 Discuss the procedures necessary to successfully save Rcmdr-generated data on a student’s

computer.

3. Judge whether null hypotheses should be rejected or maintained. 3.1 Discuss the differences between null and alternative hypotheses. 3.2 Discuss differences between one-sided and two-sided hypotheses and when to use them. 3.3 Explain how to rule our rival hypotheses.

Course/Unit

Learning Outcomes Learning Activity

1.1, 1.2

Unit Lesson Chapter 3 Chapter 4 Unit II Assignment 2

2.1, 2.2

Unit Lesson Chapter 3 Chapter 4 Unit II Assignment 1 Unit II Assignment 2

3.1, 3.2, 3.3 Unit Lesson Unit II Assignment 1

Required Unit Resources Chapter 3: A Quick Tour of the R Commander Chapter 4: Data Input and Data Management Unit Lesson

Introduction The knowledge you have gained already by completing the Collaborative Institutional Training Initiative (CITI) Essentials of Statistical Analysis (EOSA) modules in Unit will help you in the remainder of the course and as you work your way through your doctoral study. In Unit II, we now turn our focus to the statistical program R and how to navigate the program and upload a data set. We will also investigate the R Commander graphical user interface (GUI) interface, which will allow you to use the R statistical program using a familiar point-and-click interface.

UNIT II STUDY GUIDE R and Rcmdr

RCH 8303, Quantitative Data Analysis 2

UNIT x STUDY GUIDE Title

R is mostly a code-driven statistical program and therefore difficult for many students to initially grasp how to use when they are also trying to learn how to perform data analysis. The author of our textbook, John Fox, developed the Rcmdr interface that allows the user to utilize the program using familiar point-and-click methods. While it is helpful to perform advanced analyses, there is no source code to remember.

Unit II Plan The Unit II assignment will be in two parts. Part 1 of your assignment requires you to complete modules of the CITI Program EOSA that relate directly to the readings in this unit. Each of the modules has a final quiz that must be completed and successfully passed, demonstrating your knowledge of basic statistics and the research process. For Part 2, you will need to have R and the R Commander installed on your computer. This lesson will briefly explore some of the features and capabilities of R Commander as well as data input and data management following with an assignment requiring you to report descriptive statistics of a data set. If you are not comfortable utilizing R and R commander, you may use whatever statistical software program you choose. The answers you submit for your assignment must be correct regardless of the software you choose. These are the topics for the Unit II CITI EOSA course. Standard Error and Type I-II Errors (ID 17617): This module discusses, explains, and demonstrates the use of the central limit theorem, imprecision and the standard error, null and alternative hypotheses, and type I and Type II errors. This module is important to understanding the central limit theorem and how repeatedly sampling from the same population would form a normal distribution. Also, the concept of statistical versus practical significance is introduced. The Four Horsemen (ID 17618): This module identifies the four factors that interact to affect the outcome of any given study or analysis. This module demonstrates the proper procedures for conducting a power analysis, what to do with the information obtained, and how to plan a study to maximize the likelihood of detecting an effect, if there is one to be found. This module introduces the student to the Effect size— magnitude of the difference or relationship that emerges in a study. Confidence Intervals and Degrees of Freedom (ID 17619): This module will introduce the student confidence intervals and how to create and interpret them. Students will learn how to test hypotheses (introduced in previous modules) using confidence intervals and explain what degrees of freedom and what role they play in statistical analysis.

R Commander Chapter 3 introduces the R Commander GUI by demonstrating its use for a simple problem. The chapter illustrates the following steps:

In short, this is the typical workflow of data analysis using the R Commander. Turning to Appendix A on pages 200–205 of your textbook, all the menus available to you with the R Commander are displayed. As we move though this course, we will utilize more of the menus.

• start the R Commander, • describe the structure of the R Commander interface, • how to read data into R Commander, • how to modify data to prepare them for analysis, • how to draw a graph, • how to compute numerical summaries of data, • how to create a printed report of your work, • how to edit and re-execute commands generated by the R Commander, and • how to terminate your R and R Commander session.

RCH 8303, Quantitative Data Analysis 3

UNIT x STUDY GUIDE Title

Data Sets In this unit, we will also turn our attention to loading a data set and exploring some of the options available to us. Chapter 4 of your textbook demonstrates how to upload data into the R Commander from a variety of sources, including entering data directly at the keyboard, reading data from a plain-text file, accessing data stored in an R package, and importing data from an Excel or other spreadsheet or from other statistical software. Chapter 4 also demonstrates how to save and export R data sets from the R Commander and how to modify data. Now that you have R loaded on your computer, we will load the data set Datasets.xlsx from the textbook website.

Importing Data in R Using the R Commander Here is a brief tour/example on how to import data in R using the R Commander: First, starting R Commander takes you to the top-level home screen (Figure 1). This is the starting point for every session. Make sure that when you access R, you also load R Commander. Type in library(Rcmdr) or see Unit I for a refresher on how to gain access to R Commander. Once R and R Commander have been loaded, the home screen displays. Figure 1 R Commander Home Screen

RCH 8303, Quantitative Data Analysis 4

UNIT x STUDY GUIDE Title

Next, click on the Data menu item (Figure 2). Figure 2 Accessing the Data Menu in R Commander

RCH 8303, Quantitative Data Analysis 5

UNIT x STUDY GUIDE Title

Once selected, drill down to the menu option Import Data…From Excel file (Figure 3). Figure 3 Importing Data From an Excel File in R Commander

RCH 8303, Quantitative Data Analysis 6

UNIT x STUDY GUIDE Title

Once you select Importing Data from Excel file, a new screen will open allowing you to name your data set and address variable names, row names, whether to convert characters to factors, and how to address missing data (Figure 4). Figure 4 Import Data From Excel File Options in R Commander

It is important to save the name of the data set as a one-word name. For illustration purposes, let’s use the default name Dataset. Once you address the options and select OK, you can navigate to the data file on your computer. You are able to save files in the cloud or on your computer, so the location is not a big issue.

RCH 8303, Quantitative Data Analysis 7

UNIT x STUDY GUIDE Title

Once you click on the file, you will notice whether the file upload was a success or not. Figure 5 Confirmation of Data File Import in R Commander

Notice that this data set has 45 rows and 5 columns.

RCH 8303, Quantitative Data Analysis 8

UNIT x STUDY GUIDE Title

The next step is to view the data set. Go to the top of R Commander and find View data set. You may need to move the items around since they are separate interfaces (Figure 6). Figure 6 Viewing a data set in R Commander (Step 1)

The data set was successfully imported and you can view the data set on the screen that pops up with the data (Figure 7).

RCH 8303, Quantitative Data Analysis 9

UNIT x STUDY GUIDE Title

Figure 7 Viewing a data set in R Commander (Step 2)

RCH 8303, Quantitative Data Analysis 10

UNIT x STUDY GUIDE Title

Exploring the Features and Capabilities of R Commander Now that we have imported an Excel data set to R, we can briefly explore some of the features and capabilities of R Commander. For a complete view of the menus, please see pages 200–205 of the textbook. First, let’s obtain descriptive statistics of the active data set (see Figure 8). Figure 8 Obtaining summary statistics in R Commander

RCH 8303, Quantitative Data Analysis 11

UNIT x STUDY GUIDE Title

Next, obtain common summary statistics by selecting the Numerical Summary option (see Figure 9). Figure 9 Obtaining numerical summaries in R Commander

RCH 8303, Quantitative Data Analysis 12

UNIT x STUDY GUIDE Title

To examine if the education variable of the active data set follows an approximate normal distribution, one can select the Test of Normality menu option. Once selected, you can select the education variable and one of six common tests to review the results. In addition, you can select whether to examine the distribution of the variable by groups. For this illustration, select the Shapiro-Wilk Normality Test (Figure 10). Figure 10 Selecting Test of Normality in R Commander

Mandy McHaney
Added blue arrow

RCH 8303, Quantitative Data Analysis 13

UNIT x STUDY GUIDE Title

Once “OK” is clicked, the results are displayed in the output window (Figure 11). Figure 11 Results of Shapiro-Wilk Normality Test in R Commander

Learning Activities (Nongraded) Nongraded Learning Activities are provided to aid students in their course of study. You do not have to submit them. If you have questions, contact your instructor for further guidance and information. For this unit, when studying APA formatting, pay particular attention to the sections that pertain to formatting for research and statistics. Review formatting as needed.

  • Course Learning Outcomes for Unit II
  • Required Unit Resources
  • Unit Lesson
  • Introduction
  • Unit II Plan
  • R Commander
  • Data Sets
  • Importing Data in R Using the R Commander
  • Exploring the Features and Capabilities of R Commander
  • Learning Activities (Nongraded)