Appendix AAn Introduction to R
and bayesm
In order to facilitate computation of the models in this book, we created a set of programs written in R and C++. R is a general purpose programming and statistical analysis system. R is free and available on the web. We have made our suite of programs into what is called an R “package.” Our package is named bayesm
. This package is easy to download and install from within R and is thoroughly documented, including test examples and illustrative datasets.
This appendix provides an introduction to the R environment and bayesm
. In addition, there are many excellent books and video tutorials available on the R environment and RStudio enhancements.
A.1 SETTING UP THE R
ENVIRONMENT AND BAYESM
Virtually, all users of the R statistical language use the RStudio Integrated Development environment (IDE). RStudio works on top of R and provides a convenient visual and programming interface. Of particular interest is that RStudio provides a graphical interface that makes R programming and package installation very convenient. RStudio provides a very nice code development environment, which includes dynamic syntax checking of R code and integration of the interface with C++. RStudio also supports a very wide variety of enhancements to the basic R interface including dynamic report generation using Rmarkdown.
A.1.1 Obtaining R
Visit http://cran.r-project.org/ or google “R language.” CRAN is a network of mirror sites that allow you to download precompiled ...
Get Bayesian Statistics and Marketing, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.