Monthly Archives: July 2012

rApache 1.2.0 Released

July 27, 2012
By
rApache 1.2.0 Released

With this release comes a minor change in behavior: for requests that have been configured with RFileEval, RFileHandler, or using the r-script handler, rApache will set the working directory to the file’s directory. For instance with a Rook deployment like this: <Location /hmisc> SetHandler r-handler ...

Read more »

ggplot2: A little twist on back-to-back bar charts

July 27, 2012
By
ggplot2: A little twist on back-to-back bar charts

Sangyoon Lee BackgroundWhile thinking about ways to represent incoming and outgoing flows in a business process, I thought about using export-import charts like the one shown here in the Learning R blog. However, as the author acknowledges, it is difficult to compare individual values using these charts. Regardless, I still wanted to have...

Read more »

Evolution average number of beds per hospital

July 27, 2012
By
Evolution average number of beds per hospital

The OECD collects (among a lot of other statistics) information on the number of hospitals and hospital beds per country. These two parameters combined and its evolution over the years could give an indication on whether or not the country’s hospital landscape is evolving towards large medical centers, small scale  Read more »

Evolution average number of beds per hospital

July 27, 2012
By
Evolution average number of beds per hospital

The OECD collects (among a lot of other statistics) information on the number of hospitals and hospital beds per country. These two parameters combined and its evolution over the years could give an indication on whether or not the country's hospital landscape is evolving towards large medical centers, small scale hospital settings or whether there is no trend to detect. In the graph below...

Read more »

More on Factor Attribution to improve performance of the 1-Month Reversal Strategy

July 26, 2012
By
More on Factor Attribution to improve performance of the 1-Month Reversal Strategy

In my last post, Factor Attribution to improve performance of the 1-Month Reversal Strategy, I discussed how Factor Attribution can be used to boost performance of the 1-Month Reversal Strategy. Today I want to dig a little dipper and examine this strategy for each sector and also run a sector-neutral back-test. The initial steps to

Read more »

Linear regression by gradient descent

July 26, 2012
By
Linear regression by gradient descent

In Andrew Ng's Machine Learning class, the first section demonstrates gradient descent by using it on a familiar problem, that of fitting a linear function to data. Let's start off, by generating some bogus data with known characteristics. Let's make y just a noisy version of x. Let's also add 3 to give the intercept term something to...

Read more »

Big vectors coming to R

July 26, 2012
By

R has been available as a 64-bit application since it's earliest days. But the internal representation of R's fundamental data type — the vector — has long been subject to a 32-bit limitation: the maximum number of elements is capped at 2^31 (or just over 2.1 billion) elements. Now, at 8 bytes per element that's 16Gb of data, so...

Read more »

Changing function scope in GNU R example

July 26, 2012
By

In my last post I have discussed how to work around GNU R scoping rules using environment function. This time let us look at a practical example using recode function from car package.First let us look at how&nbs...

Read more »

Monitor: Using category labels

July 26, 2012
By
Monitor: Using category labels

I´ve been checking recently the performance of a calibration of compound feed with  a set of samples (15): 3 samples of hen feed, 3 of pig feed, 3 of chicken feed, 3 of ovine feed and 3 of cattle feed.The idea is to check if the calibration predi...

Read more »

Plotting 95% Confidence Bands in R

July 26, 2012
By
Plotting 95% Confidence Bands in R

I am comparing estimates from subject-specific GLMMs and population-average GEE models as part of a publication I am working on. As part of this, I want to visualize predictions of each type of model including 95% confidence bands. First I had to ma...

Read more »