# Blog Archives

## More 3D Graphics (rgl) for Classification with Local Logistic Regression and Kernel Density Estimates (from The Elements of Statistical Learning)

February 7, 2015
By

This post builds on a previous post, but can be read and understood independently. As part of my course on statistical learning, we created 3D graphics to foster a more intuitive understanding of the various methods that are used to relax the assumption of linearity (in the predictors) in regression and classification methods. The authors

## Some 3D Graphics (rgl) for Classification with Splines and Logistic Regression (from The Elements of Statistical Learning)

February 1, 2015
By

This semester I'm teaching from Hastie, Tibshirani, and Friedman's book, The Elements of Statistical Learning, 2nd Edition. The authors provide a Mixture Simulation data set that has two continuous predictors and a binary outcome. This data is used to demonstrate classification procedures by plotting classification boundaries in the two predictors. For example, the figure below

## Read sas7bdat files in R with GGASoftware Parso library

September 12, 2014
By

... using the new R package sas7bdat.parso. The software company GGASoftware has extended the work of myself and others on the sas7bdat R package by developing a Java library called Parso, which also reads sas7bdat files. They have worked out most of the remaining kinks. For example, the Parso library reads sas7bdat files with compressed

## Making inferences about unusual population quantities.

April 4, 2014
By

This post builds on my last: Alternatives to model diagnostics for statistical inference?, where I had claimed that we could make quality inferences about the best linear approximation to a quadratic relationship. The R code below implements such a scenario, to establish a framework for discussion. I have inserted comments to augment the code. set.seed(42)

## Alternatives to model diagnostics for statistical inference?

March 28, 2014
By

Consider the problem of making statistical inferences, as opposed to predictions. The product of statistical inference is a probabilistic statement about a population quantity, for example a 100(1-)% confidence interval for a population median. In this context, the principal reason for diagnostics is to comfort ourselves about the quality of such inferences. For example, we

## Image CGI with R

March 24, 2014
By

I received an email recently with a question about using R in the common gateway interface (CGI) framework to create and pass image data to the web browser. I posted to stackoverflow about this some time ago, but had forgotten the details. The trouble is that R's graphics devices only write image data to file,

## A Recipe for Trellis/Faceted Plots Using Base R Graphics

July 5, 2013
By

I frequently use lattice and ggplot2 to create trellis/faceted graphics. But, I gave up using these packages in a recent application, where I had initially constructed a complex graphic using the base R plotting functions. When I later decided that I wanted a faceted version, there was a dilema: re-create the complex graphic using lattice

## Descending Text in Righthand Margin of R Graphics à la mtext

June 28, 2013
By

There was an R-help thread in January regarding text in the righthand margin of an R graphic, where the text should be rendered in reading order from top to bottom. The base R function mtext is used to plot text in the margin. But, mtext is only able to render text from left to right

## Hurray! An R Connections API!

April 3, 2013
By

I waited until April 3 to post this, so it wouldn't be taken as an April Fool's joke! A recent R News item announces that we now have a bona fide mechanism to create custom connections in R! This makes it possible to implement a custom connection in an R package. Until now, the only

## Identify 2/3 vacation photos, win \$5 Starbucks gift card

March 29, 2013
By

I have a \$5 Starbucks gift card that I simply can't remember to use; I've had it since Christmas. So, I will mail it (within the U.S.A.) to the first commenter who can identify the longitude/latitude (within 5km) where two of these three vacation photos were taken (photos below). ***Update 3/30/2013: locations A and C