Active Learning and R

I hope that you find this site useful while commuting to work or school or in quiet times while sitting on an easy chair thinking deep thoughts. Personally, I find that these are times when a book (hard-copy or electronic) is more suitable for my learning style. But, to each their own.

Active Learning
For other times, this site is designed for people to be actively engaged in learning statistical methods. Although one can make great strides in learning statistical theory in non-active modes while reading a textbook, I believe that the process of applying these theories to data can only be learned by doing. So, be an active participant; spend some time thinking about each situation I propose before viewing the solutions. Then, when you have seen the solution, play a “what if?” game. See what would happen if you tweak the model a bit or use another data set. Remember, in this environment, you are both the learner and the teacher.

To allow you to be an active participant, this site features the statistical package R as a tool for analyzing data. They are many great statistical packages available, all with relative strengths and weaknesses. My approach to learning statistical methods is that if you understand the theory and are familiar with one package, learning a second package is relatively straight-forward. (Easy for me to say….).

To get you started on R, I have some installation and starting instructions on my companion site, available here. This statistical package is widely (and freely) available, so there are lots of great places that also provide this support. The original source site is www.r-project.org.

Site Conventions for Including R Code
in this site you will see that I have included examples where I say things like “See R Code in Action”. When you click on this, it displays the R code and a little button that says “Evaluate”. If you do so, it sends the R code off to a server someplace, evaluates the R code, and sends the output back! This is very cool because it means that you don’t have to install R to run the demo. You can also alter the commands and explore on your own. Give it a try.

This feature is great if you are new to R. However, after a while, this approach will become frustrating. You will find that the output is messy. Further, the server will not send back plots and does not have all of the functionality (packages) that you will want. So, after the first few chapters, you will see displays such as:

R Code and Output

This contains the R-code and the output from it. If you are a passive viewer, this is enough to move you along. Active participants will copy the code into a working session of R, execute it, and analyze it further.

Additional R Resources
I don't want this to be an R site in part because I want to focus on actuarial applications of statistical methods but also in part because there are a lot of good resources out there. But here are a few hints that might help you.

  • For finding commands quickly, I like the Quick - R site
  • I use the R-studio platform as a way of organizing my R session.
  • I often use the R-commander graphical user interface (GUI) interface when teaching classes to help students get started.

So, let's get started!

[raw] [/raw]