Tuesday, August 27, 2013

Multicore (parallel) processing in R

Multicore (parallel) processing in R from Wallace Campbell on Vimeo.

If you're not programming in parallel, you're only using a fraction of your computer's power! I demonstrate how to run "for" loops in parallel using the mclapply function from the multicore library. The code can be scaled to any number of available cores.

Monday, August 26, 2013

Survival analysis in R: Weibull and Cox proportional hazards models

I describe how to estimate the Weibull accelerated failure time model and the Cox proportional hazards model, test the assumptions, make predictions, and plot survival functions using each model.



Survival analysis in R: Weibull and Cox proportional hazards models from Wallace Campbell on Vimeo.

Nonparametric (local polynomial) regression in R

Local polynomial regression models can be used as a more flexible alternative to linear regression. However, the nonparametric regression models are slightly more difficult to estimate and interpret than linear regression. This video explains almost everything you need to know about local polynomial models in R including choosing the bandwidth, estimating the model, plotting the regression, and estimating marginal effects. I use Wand and Ripley's KernSmooth package.



Estimation, prediction, and evaluation of logistic regression models

I provide an introduction to using logistic regression for prediction (binary classification) using the Titanic data competition from www.Kaggle.com as an example. I use models to predict in missing data, estimate a logistic regression model on a training data set, and use the estimated model to predict survival on a test data set. The video covers just about everything you need to know to estimate, predict, and evaluate logistic regression models in R.

For more R resources, check out R-Bloggers! I seriously learn something every day from this site.

Estimation and simulation of the geometric Ornstein-Uhlenbeck process

The Ornstein-Uhlenbeck process is mean reverting process commonly used to model commodity prices. I demonstrate how to estimate the process using a set of price data and provide a function for simulation.