2180 search results for "ggplot2"

Bacteria and Alzheimer’s disease: I just need to know if ten patients are enough

October 29, 2013
By
Bacteria and Alzheimer’s disease: I just need to know if ten patients are enough

You can guarantee that when scientists publish a study titled: Determining the Presence of Periodontopathic Virulence Factors in Short-Term Postmortem Alzheimer’s Disease Brain Tissue a newspaper will publish a story titled: Poor dental health and gum disease may cause Alzheimer’s Without access to the paper, it’s difficult to assess the evidence. I suggest you read

Read more »

Two interesting ideas here: “trading time” price impact of a…

October 29, 2013
By
Two interesting ideas here:
“trading time”
price impact of a…

Two interesting ideas here: "trading time" price impact of a trade proportional to exp( √size ) Code follows: require(quantmod) getSymbols("MER") #Merrill Lynch #Gatheral's model HiLo Op(symbol) #munging mer names(mer) = "UpDay"names(mer) = "HiLo" mer ...

Read more »

Two interesting ideas here: “trading time” price impact of a…

October 29, 2013
By
Two interesting ideas here:
“trading time”
price impact of a…

Two interesting ideas here: "trading time" price impact of a trade proportional to exp( √size ) Code follows: require(quantmod) getSymbols("MER") #Merrill Lynch #Gatheral's model HiLo Op(symbol) #munging mer names(mer) = "UpDay"names(mer) = "HiLo" mer ...

Read more »

Forecasting the number of visitors on your website using R. Part II

October 29, 2013
By
Forecasting the number of visitors on your website using R. Part II

This blog is the second post of a series of three blogs. Previous Blog Implementing the time-series exponential smoothing in R: I have used the HoltWinters (also a function in the forecasting package of R ) model to implement the exponential smoothing on the visitors data. This model will take care of the Seasonality, Trend,

Read more »

Table as an Image in R

October 24, 2013
By
Table as an Image in R

Usually, it's best to keep tables as text, but if you're making a lot of graphics, it can be helpful to be able to create images of tables.PNG tableCreating the TableAfter loading the data, let's first use this trick to put line breaks between the leve...

Read more »

The Basics of Encoding Categorical Data for Predictive Models

October 23, 2013
By
The Basics of Encoding Categorical Data for Predictive Models

Thomas Yokota asked a very straight-forward question about encodings for categorical predictors: "Is it bad to feed it non-numerical data such as factors?" As usual, I will try to make my answer as complex as possible. (I've heard the old wives tale that eskimos have 180 different words in their language for snow. I'm starting to think that statisticians have...

Read more »

Time series plots in R

October 23, 2013
By
Time series plots in R

I recently coauthored a couple of papers on trends in environmental data (Curtis & Simpson in press; Monteith et al. in press), which we estimated using GAMs. Both papers included plots like the one shown below wherein we show the estimated trend and associated point-wise 95% confidence interval, plus some other markings. The coloured sections show...

Read more »

When did “How I Met Your Mother” become less legen.. wait for it…

October 21, 2013
By
When did “How I Met Your Mother” become less legen.. wait for it…

…dary!  Or, as you’ll see below, when did it become slightly less legendary?  The analysis in this post was inspired by DiffusePrioR’s analysis of when The Simpsons became less Cromulent. When I read his post a while back, I thought … Continue reading →

Read more »

Bar plot with error bars in R

October 20, 2013
By
Bar plot with error bars in R

Here's a simple way to make a bar plot with error bars three ways: standard deviation, standard error of the mean, and a 95% confidence interval. The key step is to precalculate the statistics for ggplot2. Continue reading →

Read more »

Plotting Times of Discrete Events

October 19, 2013
By
Plotting Times of Discrete Events

I recently enjoyed reading O’Hara, R. B., & Kotze, D. J. (2010). Do not log-transform count data. Methods in Ecology and Evolution, 1(2), 118–122. doi:10.1111/j.2041-210X.2010.00021.x. The article prompted me to think about processes involving discrete events and how these might be presented graphically. I am not talking about counts (which are well represented by a

Read more »