Sunday, July 24, 2011

Links to Online Documentation


I am starting to gather links to manuals, tutorials  of free software.

  1. Maxima Computer Algebra System.
    Manual: http://maxima.sourceforge.net/docs/manual/en/maxima.html
  2. Python Programming Language.
    Main Documentation Page: www.python.org/doc/
    Reference: docs.python.org/reference/   
  3. R statistical  software.
    Index to manuals: http://cran.r-project.org/manuals.html
  4. Gretl Econometrics Software.
    Gretl-Guide: http://ricardo.ecn.wfu.edu/pub/gretl/manual/en/gretl-guide.pdf
  5. Scipy and Numpy.
    http://docs.scipy.org/doc/

Friday, July 8, 2011

Plotting Small Samples with R.

R has a comprehensive set of routines for visualization of data. Here we show some of its capabilities on  a small sample Y containing positive values.


library("vioplot")

X <- c(rnorm(50, 10, 3),rnorm(50, 15, 5))
Y <- c(runif(10, 5, 20))


par(mfrow=c(3,3))

pie(Y, main="Small sample", sub="A Pie Chart")
dotchart(Y, main="Small sample", sub="A Dot Chart")
stripchart(Y, main="Small Sample", sub="A Strip chat")

barplot(Y, main="Small sample", sub="A vertical Bar Chart")
barplot(Y, horiz=T, main="Small sample", sub="A Horizontal Bar Chart")

boxplot(Y, main="Small sample", sub="A box plot")
vioplot(Y)  # package vioplot
title <- "A vio plot"

plot(Y, type="p", main="Small Sample", sub="A Scatterplot")
plot(Y, type="l", main="Small Sample", sub="A Line plot")



First a few observations:

  1.The vioplot function does not allow seting the main title or sub title. Instead you should call title("title of graph") after the call to vioplot.

  2. Pie charts are not well loved by statisticians, they cannot represent negative values and its difficult to judge magnitudes.



Here is a screenshot of the small sample plots.


Next time we will present plots which can handle a larger number of data points.