A Introduction to R

The first module provides an overview of freely accessible software widely used for data analysis in economic research. The central focus is R, a programming language specifically developed for statistical computing and graphics. Complementary software - RStudio, R Markdown, and LaTeX - are introduced as supportive tools for dynamic document creation based on R. This module will guide you through the installation process and will familiarize you with the utilization of these tools by exploring key syntax. Specifically, the module explores the syntax necessary to import, process, and visualize data in R, and then how to incorporate the resulting graphs into a professional data report ready to be sent to customers.

A.1 Overview

This module consists of the following chapters:

  • Chapter 1: “Software Overview” provides an overview of software commonly used for data analysis in economic research.
  • Chapter 2: “Software Installation” provides a step-by-step guide to installing these software tools.
  • Chapter 3: “R Basics” walks you through RStudio’s interface, introduces fundamental R operations, showcases efficient coding practices, and highlights pivotal R packages.
  • Chapter 4: “Data Structures in R” discusses the fundamental data types and structures in R.
  • Chapter 5: “Process Data in R” introduces the key functions to import, process, manipulate, and visualize data in R.
  • Chapter 6: “Write Reports with R Markdown” covers the use of R Markdown for creating dynamic, reproducible data reports.

Moreover, the following DataCamp courses supplement the chapters mentioned above:

  • Introduction to R for Finance: An introductory R course on the essentials of the language.
  • Intermediate R for Finance: A more advanced R course focusing on data analysis tools like date handling, conditional statements, loops, functions, and apply functions, all using finance-related examples.

The module culminates in the creation of a data report:

  • Data Report on Stock Returns: This evaluates your skills in importing, processing, and visualizing data in R. It also tests your ability to craft dynamic reports using R Markdown and to convey insights on stock market indicators.

A.2 Learning Objectives

By the end of this module, you should be able to:

  1. Identify the role and importance of software tools such as R, RStudio, R Markdown, and LaTeX in conducting economic research.
  2. Install and set up necessary software including R, RStudio, R Markdown, and LaTeX for economic data analysis.
  3. Navigate the RStudio interface, understanding its various panels and functionalities.
  4. Understand and apply basic R data types and structures for data storage and manipulation.
  5. Import external datasets into R for analysis, and download data directly within the R environment.
  6. Create professional data reports using R Markdown, incorporating R code, text, plots, and tables seamlessly.
  7. Utilize online learning resources like DataCamp to enhance R skills and knowledge further.
  8. Apply the knowledge and skills acquired to write a data report, demonstrating proficiency in data import, manipulation, and presentation, as well as interpretation of economic data.

A.3 Learning Activities & Assessments

Throughout this module, you’ll engage in the following activities:

  • Textbook Engagement: Read the textbook chapters 1 to 6 and reproduce the content provided. Input the code from the chapters into RStudio and verify that your results match the chapter outputs.

  • DataCamp Training: Work through the Introduction to R for Finance and Intermediate R for Finance courses on DataCamp. While progressing through the courses, keep an R script handy and apply the learned functions to any of the datasets introduced in this module. This preserves the new functions of the course and potentially offers new insights from the chosen dataset.

  • Data Report Creation: To consolidate your learning, craft a Data Report on Stock Markets using R Markdown. Your report should clearly display data, provide meaningful analyses, and embody the module’s content.

Your assessment will be based on:

  • DataCamp Course Completion: Finish the designated DataCamp courses for this module. Your grade is based on course completion; thus, you receive full credit by completing all chapters and obtaining a minimum of 75% XPs (experience points) by the deadline. Hence, while the Take Hint and Show Answer options reduce your XPs, they won’t affect your module grade if you stay above the 75% threshold.

  • Data Report Evaluation: The quality of the data report is central to module assessment. It should be professional, suitable for clients, and reflect the module’s content. Ensure you adhere to the data report instructions.

For further guidance on maximizing your textbook and DataCamp experience, consult the Textbook Engagement and Learn R with DataCamp sections. For specifications on the data report’s format and content, consult the Data Report Instructions and the subsequent section below.

A.4 Data Report on Stock Returns

You are tasked with preparing a data report on stock returns. Your report should analyze a company’s stock returns and compare them with those of related companies and stock market indices. Visualize historical stock market data, identify patterns, and examine significant historical events.

As preparation for this assignment, please work through the module chapters and DataCamp courses listed under the overview section above. Ensure your report adheres to the guidelines detailed in Data Report Instructions, which dictates the creation of two versions: official and internal. Upon completion, submit both versions on Blackboard.