howto

Running R2WinBUGS on a Mac Running OSX

January 18, 2012 | jebyrnes

I have long used JAGS to do all of my Bayesian work on my mac. Early on, I tried to figure out how to install WinBUGS and OpenBUGS and their accompanying R libraries on my mac, but, to no avail. I just had too hard of a time getting them ... [Read more...]

Even Simpler Multivariate Correlated Simulations

August 31, 2010 | JD Long

So after yesterday’s post on Simple Simulation using Copulas I got a very nice email that basically begged the question, “Dude, why are you making this so hard?” The author pointed out that if what I really want is a Gaussian correlation structure for Gaussian distributions then I could ... [Read more...]

Stochastic Simulation With Copulas in R

August 30, 2010 | JD Long

A friend of mine gave me a call last week and was wondering if I had a little R code that could illustrate how to do a Cholesky decomposition. He ultimately wanted to build a Monte Carlo model with correlated variables. I pointed him to a number of packages that ... [Read more...]

Compcache on Ubuntu on Amazon EC2

May 4, 2010 | heuristicandrew

The following fully-automatic Bash script downloads, compiles, and initializes compcache version 0.6.2 on Ubuntu Karmic Koala (9.10). This script creates two swaps with a maximum of 4GB uncompressed size each. Two swaps are used to take advantage of 2 CPUs (or CPU cores in a multicore CPU). Compcache is a fascinating memory compression ... [Read more...]

How to Produce Fake Data Analysis in R: 3 Easy Steps

April 2, 2010 | Drew Conway

Did you really think that a team of researchers spent their weekends counting the number of shirtless adolescent men and exposed penises they could find on charoulette.com? Perhaps you should not answer that, as it may be a better measure of your opinion of sociologist than gullibility. It is ... [Read more...]

Weighting model fit with ctree in party

March 15, 2010 | heuristicandrew

Conditional inference trees (ctree) in package party allows weighting which is useful when one classification outcome is more important than another. Useful examples are not difficult to imagine: in a marketing direct mailing, a false positive (non-res... [Read more...]

Plot ROC curve and lift chart in R

December 18, 2009 | heuristicandrew

This tutorial with real R code demonstrates how to create a predictive model using cforest (Breiman’s random forests) from the package party, evaluate the predictive model on a separate set of data, and then plot the performance using ROC curves ... [Read more...]

Delete rows from R data frame

October 8, 2009 | heuristicandrew

Deleting rows from a data frame in R is easy by combining simple operations. Let’s say you are working with the built-in data set airquality and need to remove rows where the ozona is NA (also called null, blank or missing). The method is a conce... [Read more...]

Not Just Normal… Gaussian

June 16, 2009 | JD Long

Dave, over at The Revolutions Blog, posted about the big ‘ol list of graphs created with R that are over at Wikimedia Commons. As I was scrolling through the list I recognized the standard normal distribution from the Wikipedia article on the same topic. Below is the fairly simple source ...
[Read more...]

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)