GPS Basemaps in R Using get_map

February 14, 2013
By
GPS Basemaps in R Using get_map

There are many different maps you can use for a background map for your gps or other latitude/longitude data (i.e. any time you're using geom_path, geom_segment, or geom_point.)get_mapHelpfully, there's just one function that will allow you to query Google Maps, OpenStreetMap, Stamen maps, or CloudMade maps: get_map in the ggmap package. You could also use either get_googlemap, get_openstreetmap, get_stamenmap, or get_cloudmademap, but...

Read more »

Major update to the R-package geomorph

February 14, 2013
By

Hi Folks,We have just completed a major update to the R-package geomorph: software for geometric morphometric analyses in R.  Included are several new functions to  carry out additional GM analyses, as well as enhancements of existing functio...

Read more »

Veterinary Epidemiologic Research: Linear Regression

February 14, 2013
By
Veterinary Epidemiologic Research: Linear Regression

This post will describe linear regression as from the book Veterinary Epidemiologic Research, describing the examples provided with R. Regression analysis is used for modeling the relationship between a single variable Y (the outcome, or dependent variable) measured on a continuous or near-continuous scale and one or more predictor (independent or explanatory variable), X. If

Read more »

Happy Valentine’s Day @mrshrbrmstr!

February 14, 2013
By
Happy Valentine’s Day @mrshrbrmstr!

dat<- data.frame(t=seq(0, 2*pi, by=0.1) ) xhrt <- function(t) 16*sin(t)^3 yhrt <- function(t) 13*cos(t)-5*cos(2*t)-2*cos(3*t)-cos(4*t) dat$y=yhrt(dat$t) dat$x=xhrt(dat$t) with(dat, polygon(x,y, col="hotpink")) i heaRt you! (R code inspired by/lifted from: DWin on StackOverflow)

Read more »

Population simulation leads to Valentine’s Day a[R]t

February 14, 2013
By
Population simulation leads to Valentine’s Day a[R]t

Working on a quick-and-dirty simulation of people wandering around until they find neighbors, then settling down. After playing with the coloring a bit I arrived at the above image, which I quite like. Code below: # Code by Matt Asher for statisticsblog.com # Feel free to modify and redistribute, but please keep this notice  

Read more »

R database interfaces

February 14, 2013
By

Several packages on CRAN provide (or relate to) interfaces between databases and R.  Here is a summary, mostly in the words of the package descriptions.  Remember that package names are case-sensitive. The packages that talk about being DBI-compliant are referring to the DBI package (see below in “Other SQL”). MySQL dbConnect: Provides a graphical user The post R...

Read more »

Getting a simple tree via NCBI

February 14, 2013
By
Getting a simple tree via NCBI

I was just at the Phylotastic hackathon in Tucson, AZ at the iPlant facilities at the UofA. A problem that needs to be solved is getting the incrasingly vast phylogenetic information to folks not comfortable building their own phylogenies. Phylomatic has made this super easy for people that want plant phylogenies (at least 250 or so papers...

Read more »

Getting a simple tree via NCBI

February 14, 2013
By
Getting a simple tree via NCBI

I was just at the Phylotastic hackathon in Tucson, AZ at the iPlant facilities at the UofA. A problem that needs to be solved is getting the incrasingly vast phylogenetic information to folks not comfortable building their own phylogenies. Phylomatic has made this super easy for people that want plant phylogenies (at least 250 or so papers...

Read more »

Version 1.0 of multilevelPSA Available on CRAN

February 14, 2013
By
Version 1.0 of multilevelPSA Available on CRAN

Version 1.0 of multilevelPSA has been released to CRAN. The multilevelPSA package provides functions to estimate and visualize propensity score models with multilevel, or clustered, data. The graphics are an extension of PSAgraphics package by Helmreich and Pruzek. The example below will investigate the differences between private and public school internationally using the Programme of International Student Assessment...

Read more »

No Statistical Panacea, Hierarchical or Otherwise

February 13, 2013
By
No Statistical Panacea, Hierarchical or Otherwise

Everyone in academia knows how painful the peer-review publication process can be. It’s a lot like Democracy, in that it’s the worst system ever invented, except for all the others. The peer-review process does a fair job at promoting good … Continue reading →

Read more »

Apply Yourself !

February 13, 2013
By
Apply Yourself !

Hello. Welcome to my debut post ! Check the About link to see what this Blog intends to accomplish. In this article I discuss a general approach for dealing with the problem of splitting a data frame based on a grouping variable and then doing some more operations per group. A secondary goal is to

Read more »

Multiple Stocks Plot Shiny web application

February 13, 2013
By
Multiple Stocks Plot Shiny web application

Today, I want to share the Multiple Stocks Plot application (code at GitHub). This is the second application in the series of examples (I plan to share 5 examples) that will demonstrate the amazing Shiny framework and Systematic Investor Toolbox to analyze stocks, make back-tests, and create summary reports. The motivation for this series of

Read more »

In case you missed it: January 2103 Roundup

February 13, 2013
By

In case you missed them, here are some articles from January of particular interest to R users. Anthony Damico created an amusing and useful flowchart for finding resources for learning R, especially for survey analysis. All R users: please be counted for the 2013 Rexer Data Miner Survey (R was the #1 software reported in the last survey). Relatedly,...

Read more »

Out-of-sample one-step forecasts

February 13, 2013
By

It is common to fit a model using training data, and then to evaluate its performance on a test data set. When the data are time series, it is useful to compute one-step forecasts on the test data. For some reason, this is much more commonly done by people trained in machine learning rather than statistics. If you are...

Read more »

Mason Earles on interfacing R with the Forest Vegetation Simulator

February 13, 2013
By

Mason Earles gave a great presentation this week at Davis R Users’ Group about linking R with the Forest Vegetation Simulator (FVS). FVS is a model developed by the US Forest Service to simulate forest growth over time. It’s written in FORTRAN and has been around since the 1970s. FVS has recently gone open-source (its...

Read more »

Parallel execution of randomForestSRC

February 13, 2013
By
Parallel execution of randomForestSRC

I guess I’m the resident expert on resampling methods at work. I’ve been using bagged predictors and random forests for a while, and have recently been using the randomForestSRC (RF-SRC) package in R (http://cran.r-project.org/web/packages/randomForestSRC). This package merges the two randomForest… Continue reading →

Read more »

Large claims, and ratemaking

February 13, 2013
By
Large claims, and ratemaking

During the course, we have seen that it is natural to assume that not only the individual claims frequency can be explained by some covariates, but individual costs too. Of course, appropriate families should be considered to model the distribution of the cost , given some covariates .Here is the dataset we’ll use, > sinistre=read.table("http://freakonometrics.free.fr/sinistreACT2040.txt", + header=TRUE,sep=";") > sinistres=sinistre...

Read more »

A Shiny example – SAP HANA, R and Shiny

February 13, 2013
By
A Shiny example – SAP HANA, R and Shiny

As you may already know...I love R...a fancy, open source statistics programming language. So today, I decided to learn something new using R.There aren't much Web Servers for R, but there's one that I really like called Rook, that I covered on my blog...

Read more »

igraph degree distribution: count elements

February 13, 2013
By

Unfortunately, the degree.distribution() function of the igraph library returns the intensities of the distribution:> g > plot(g) > summary(g)IGRAPH U--- 10 10 -- Ring graphattr: name (g/c), mutual (g/x), circular (g/x) So instead of having the number of elements, the density/intensities value is returned:> degree.distribution(g) 0 0 1 You can easily verify this in the source code...

Read more »

Stadium / home team effects in making field goals

February 13, 2013
By
Stadium / home team effects in making field goals

We take on a reader question of whether the stadium / home team matters for making a field goal. We pulled up the data on every field goal since 2002 (over 10,000) of them and plotted the probability of scoring as a function of the stadium in which the field goal was kicked. The post Stadium / home...

Read more »

A must-read paper on statistical analysis of experimental data

February 13, 2013
By
A must-read paper on statistical analysis of experimental data

Russ Lyons points to an excellent article on statistical experimentation by Ron Kohavi, Alex Deng, Brian Frasca, Roger Longbotham, Toby Walker, Ya Xu, a group of software engineers (I presume) at Microsoft. Kohavi et al. write: Online controlled experiments are often utilized to make data-driven decisions at Amazon, Microsoft . . . deployment and mining The post A...

Read more »

#14 A New GGPLOT Template

February 13, 2013
By
#14 A New GGPLOT Template

  So the opts() has now been given the boot, and all the cool kids are using theme() to customise their ggplots. If you’re still on an old version of R then theme() will still work, but if you update (which you should) then it’ll stop working and you’ll have to edit all your code

Read more »

Sharing my work for “Advanced Methods III”

February 13, 2013
By
Sharing my work for “Advanced Methods III”

This semester I’m taking the live version of the Data Analysis class by Jeff Leek. His more popular version of the course is available through Coursera.  One of the things that Jeff promotes is reproducibility and sharing code. I share that tendency and thus created a Git repository for my homework and code for the class: lcollado753. I’m...

Read more »

Single Stock Plot Shiny web application

February 12, 2013
By
Single Stock Plot Shiny web application

Today, I want to share the Single Stock Plot application (code at GitHub). This is the first application in the series of examples (I plan to share 5 examples) that will demonstrate the amazing Shiny framework and Systematic Investor Toolbox to analyze stocks, make back-tests, and create summary reports. The motivation for this series of

Read more »

Basic R: rows that contain the maximum value of a variable

February 12, 2013
By
Basic R: rows that contain the maximum value of a variable

File under “I keep forgetting how to do this basic, frequently-required task, so I’m writing it down here.” Let’s create a data frame which contains five variables, vars, named A – E, each of which appears twice, along with some measurements: Now, let’s say we want only the rows that contain the maximum values of

Read more »

Having fun with rgefx package and sigmajs in R

Having fun with rgefx package and sigmajs in R

The las week I knew the r package rgexf made by George Vega Yon. Rgexf is a R library to work with GEXF graph files. This type of files allow represent networks in a xml. So, if you have a list of nodes and a data frame of edges (source-target) you can obtain a gexf file with write.gexf...

Read more »

Of Meteorites and Men

February 12, 2013
By
Of Meteorites and Men

Hello Paleoposse! My name is Ryan Brown and I’m one of the newest victims bloggers here at the Paleocave. I made an appearance on Episode 134 where I talked a bit about meteorites and the asteroid mining company, Planetary Resources. I blog over at Glacial Till where, confusingly enough, I do not actually talk about glaciers.

Read more »

Another Experiment with R and Sweave

February 12, 2013
By

The R package PApages is a great start towards addressing the very common problem of internal and external reporting in the money management industry.  Advent's APX, Axys, and Black Diamond and the up and coming extremely well-connected and well-f...

Read more »

Using R — Package Installation Problems

February 12, 2013
By

This entry is part 3 of 12 in the series Using RThe post titled Installing Packages described the basics of package installation with R.  The process is wonderfully simple when everything goes well.  But it can be maddening when it …   read more ...

Read more »

Sponsors