3888 search results for "git"

Histogram + Density Plot Combo in R

September 27, 2012
By
Histogram + Density Plot Combo in R

Plotting a histogram using hist from the graphics package is pretty straightforward, but what if you want to view the density plot on top of the histogram? This combination of graphics can help us compare the distributions of groups.Let's use...

Read more »

The simplest Species Distribution Model in OpenBUGS & R

September 27, 2012
By

This post demonstrates the simplest Species Distribution Model based on logistic regression for presence/absence data. I heavily simplified the example from Kéry (2010): Introduction to WinBUGS for Ecologists, Chapter 20.Read more →

Read more »

Bounding sums of random variables, part 1

September 27, 2012
By
Bounding sums of random variables, part 1

For the last course MAT8886 of this (long) winter session, on copulas (and extremes), we will discuss risk aggregation. The course will be mainly on the problem of bounding  the distribution (or some risk measure, say the Value-at-Risk) for two random variables with given marginal distribution. For instance, we have two Gaussian risks. What could be be worst-case scenario...

Read more »

Simplest possible heatmap with ggplot2

September 27, 2012
By
Simplest possible heatmap with ggplot2

Featuring the lovely “spectral” palette from Colorbrewer. This really just serves as a reminder of how to do four things I frequently want to do: Make a heatmap of some kind of matrix, often a square correlation matrix Reorder a factor vari...

Read more »

Creating Scientific Posters using R, Latex, Beamer and Beamerposter

September 26, 2012
By
Creating Scientific Posters using R, Latex, Beamer and Beamerposter

A while ago I had the need to produce some posters that included lots of data (scientific style).  Having recently got back into R and learning LaTex I googled for a way to do this using R.  Here's what I found and ended up with, using R, LaT...

Read more »

rasterVis to the rescue

September 26, 2012
By
rasterVis to the rescue

Programmers like Oscar Perpiñán Lamigueiro are the reason I love R!  Oscar is the maintainer of the rasterVis package and it in this post I’ll explain why it is must have package for anyone working with the raster package in R.  My latest project is focused on the NOAA’s Climate Reference Network. The details can

Read more »

Modifying select off-diagonal items in a matrix

September 25, 2012
By

This is something I have had the occasion to do, and never remember how, so this is legitimately a reminder to my future self of how to do things with off-diagonal elements of a matrix. Select rows and columns are easy: mat or mat, for...

Read more »

Minimum Correlation Algorithm Speed comparison

September 25, 2012
By
Minimum Correlation Algorithm Speed comparison

The Minimum Correlation Algorithm is a heuristic method discovered by David Varadi. Below I will benchmark the execution speed of 2 versions of the Minimum Correlation Algorithm versus the traditional minimum variance optimization that relies on solving a quadratic programming problem. I have run the code above for n=10 (10 assets), n=100 (100 assets), n=500

Read more »

Visually-weighted regression plots, with Zelig

September 25, 2012
By
Visually-weighted regression plots, with Zelig

As a follow-up to yesterday’s post on producing visually-weighted regression plots, here is some code which illustrates the production of similar plots, but using Zelig’s convenient modeling and simulation functions. This code was produced...

Read more »

Use GBIF and googleVis to Make Maps with Species Occurrence Data

September 24, 2012
By
Use GBIF and googleVis to Make Maps with Species Occurrence Data

This is a short follow up on THIS posting.. I will briefly show how to use the dismo- and the googeVis package to plot species occurrences on an interactive Google map, like the one below (HERE is the R-script)MapID2ce4348e653