John Verzani’s book has a title page that shows a scatterplot with histograms of x and y variables along the two axes. It is a very powerful way of looking at two distributions. The plot was generated through a function simple.scatterplot. The function is made available as part of the UsingR package, which can be installed from CRAN. The syntax of simple.scatterplot is indeed quite simple and can be modified to, for example, show boxplots instead of histograms on the side. That would be really interesting!!

V.

How will you get boxplots instead of histograms, by simple.scatterplot?

If you just write simple.scatterplot and press return, you will see the syntax of simple.scatterplot function. You will notice that the trick is in defining a layout containing three boxes, one for the main plot and one each for the histograms/boxplots. Then the function just makes the three plots. We can easily replace the command for histogram with a command for boxplot.

We can modify the syntax and create another function that will give us stata type two way boxplots.

Will do that and post it here in a couple of days.

V.

Wow! I could do it.

I am learning.

Thanks so much my R-teacher

C