R in Finance and Economics
eBook - ePub

R in Finance and Economics

A Beginner's Guide

Abhay Kumar Singh, David Edmund Allen

Compartir libro
  1. 264 páginas
  2. English
  3. ePUB (apto para móviles)
  4. Disponible en iOS y Android
eBook - ePub

R in Finance and Economics

A Beginner's Guide

Abhay Kumar Singh, David Edmund Allen

Detalles del libro
Vista previa del libro
Índice
Citas

Información del libro

This book provides an introduction to the statistical software R and its application with an empirical approach in finance and economics. It is specifically targeted towards undergraduate and graduate students. It provides beginner-level introduction to R using RStudio and reproducible research examples. It will enable students to use R for data cleaning, data visualization and quantitative model building using statistical methods like linear regression, econometrics (GARCH etc), Copulas, etc. Moreover, the book demonstrates latest research methods with applications featuring linear regression, quantile regression, panel regression, econometrics, dependence modelling, etc. using a range of data sets and examples.

Preguntas frecuentes

¿Cómo cancelo mi suscripción?
Simplemente, dirígete a la sección ajustes de la cuenta y haz clic en «Cancelar suscripción». Así de sencillo. Después de cancelar tu suscripción, esta permanecerá activa el tiempo restante que hayas pagado. Obtén más información aquí.
¿Cómo descargo los libros?
Por el momento, todos nuestros libros ePub adaptables a dispositivos móviles se pueden descargar a través de la aplicación. La mayor parte de nuestros PDF también se puede descargar y ya estamos trabajando para que el resto también sea descargable. Obtén más información aquí.
¿En qué se diferencian los planes de precios?
Ambos planes te permiten acceder por completo a la biblioteca y a todas las funciones de Perlego. Las únicas diferencias son el precio y el período de suscripción: con el plan anual ahorrarás en torno a un 30 % en comparación con 12 meses de un plan mensual.
¿Qué es Perlego?
Somos un servicio de suscripción de libros de texto en línea que te permite acceder a toda una biblioteca en línea por menos de lo que cuesta un libro al mes. Con más de un millón de libros sobre más de 1000 categorías, ¡tenemos todo lo que necesitas! Obtén más información aquí.
¿Perlego ofrece la función de texto a voz?
Busca el símbolo de lectura en voz alta en tu próximo libro para ver si puedes escucharlo. La herramienta de lectura en voz alta lee el texto en voz alta por ti, resaltando el texto a medida que se lee. Puedes pausarla, acelerarla y ralentizarla. Obtén más información aquí.
¿Es R in Finance and Economics un PDF/ePUB en línea?
Sí, puedes acceder a R in Finance and Economics de Abhay Kumar Singh, David Edmund Allen en formato PDF o ePUB, así como a otros libros populares de Volkswirtschaftslehre y Statistik für Volks- & Betriebswirtschaft. Tenemos más de un millón de libros disponibles en nuestro catálogo para que explores.

Información

Editorial
WSPC
Año
2016
ISBN
9789813144484

Chapter 1

Introduction

R is an open source software package and environment for statistical computing and graphics. The R language has received a lot of attention in the last five years or so particularly with its growing use by Statisticians and data miners for their empirical analysis and software development. R started as a freely available implementation of the S programming language. R was created by Ross Ihaka and Robert Gentleman, of the University of Auckland, New Zealand, and now, R is developed by the R Development Core Team. R can be considered as a different implementation of S. There are some important differences, but much code written for S runs unaltered under R.
The official R website http://www.r-project.org/ provides the best description and explanation for R. This section and the section following in the introduction to R are majorly adopted from the R website.
According to Wikipedia, “R is a free software programming language and a software environment for statistical computing and graphics. The R language is widely used among Statisticians and data miners for developing statistical software and data analysis. Polls and surveys of data miners suggest R’s popularity has increased substantially in recent years”.
By design, R provides the possibility of further computations (methods) on the results (objects) of a statistical procedure. Also the graphical capabilities of R facilitate methods as simple as plot (x, y) to very specific and fine control over the output. The fact that R is based on a formal computer language gives it tremendous flexibility. Other systems present simpler interfaces in terms of menus and forms, but often the apparent user-friendliness turns into a hindrance in the longer run.

1.1Why Should We Learn R?

The growth in the number of R users in recent years has indicated that researchers around the world are either using R or will use it at some point. There are several advantages to using R for statistical computing other than its open source and doesn’t cost anything. The benefits of R for an introductory student and instructors are
R is free.
R is open source and runs on UNIX, Windows and Macintosh, so it can be used on multiple platforms.
R has an excellent built-in help system and also various online help pages including mailing lists and boards.
R has excellent graphing capabilities which are customisable.
R’s language has a powerful, easy to learn syntax with many built-in statistical functions which are provided by default built-in packages.
R is a computer programming language. It is easier for programmers to learn it and its intuitive enough for beginners.
R provides specific functions bundled in user created packages for a particular field. This makes it easier for an applied researcher to use these functions rather than having to reinvent the wheel.
R follows a type inference coding structure which enables the automatic deduction of the type of an expression in R. For example, a string is identified as character and need not be explicitly declared before. R provides a wide variety of statistical and graphical techniques, including:
Linear and nonlinear modelling,
Univariate and multivariate statistics,
Classical statistical tests,
Time series analysis/econometrics,
Simulation and modelling,
Data mining-classification, clustering, etc.,
For computationally intensive tasks, C, C++, and Fortran code can be linked and called at run time.
R is easily extensible through functions and extensions, and the R community is noted for its active contributions in terms of packages. R has over 8000 packages with new packages added more frequently than any other statistical software. The R command below should run with an Internet connection. We will discuss how to setup proxy on work computers later.
image
Although R is available for Macintosh, Unix and Linux as well, we will use R on windows in this book. In most cases, the examples and codes in this text can be used for other operating system unaltered.
Other statistical packages, such as SPSS, GRETL and Minitab, provide point-and-click graphical-user interfaces (GUIs), but R is command-oriented. Although basic R is command/script based and provides a basic script editor, GUI capabilities can be added to the R interface using packages like Rcmdr. The R interface provides a basic GUI with a console to type commands and a script editor to write scripts. It also provides a few other functionalities like loading packages, clearing workspace, changing directory, etc. Users normally type commands at a command prompt in the console or as a script in the R script editor to get a desired output.
RStudio, an integrated development environment (IDE) (http://www.rstudio.com/ide/) is a powerful and productive user interface for R. RStudio provides various additional functionalities to the basic R interface which makes RStudio the choice of IDE in this book. We will now discuss how to get R and RStudio along with installing them on windows1 in the following subsections while providing more details about the R Environment.

1.2R: Getting Started

1.2.1Installing R on windows

The latest version of R can be downloaded from the CRAN page https://cloud.r-project.org/bin/windows/base/. CRAN is a network of ftp and web servers around the world which store identical, up-to-date versions of code and documentation for R. The list of available CRAN mirrors can be found at http://cran.r-project.org/mirrors.html. The page also provides some instructions and FAQs on R installation. The R-base is an executable package which can be easily installed on a windows machine with Administrative privileges. As stated earlier R comes with a basic GUI, which has a basic source code editor and a console window for command input.
image
Figure 1.1: R GUI (Windows)
The R GUI in windows looks like as shown in Figure 1.1.

1.2.2RStudio: A better way to run R

RStudio is an IDE and is a powerful and productive user interface for R. It is freely available, and works on Windows, Mac, and Linux. RStudio also comes in a server version that can be used to run R on a remote web server. In that case,...

Índice