Stats

Simple trick to speed up ODE integration in R

Introduction I recently was doing model fitting on a ton of simulations, and needed to figure out a way to speed things up. My first instinct was to get out of the R environment and write CSnippets for the pomp package (more on this in a later blog), or to use RCpp, but I used the profvis package to help diagnose the speed issues, and found a really simple change that can save a ton of time depending on your model.

Bootstrapping Time Series Data

Introduction This demonstration is part of a requirement for my statistical consulting class at UT Austin. I will go through the basics of bootstrapping time series data using three different resampling methods. Fixed Block Sampling Stationary Block Sampling Model-based resampling Packages Used For this demonstration I will use the following packages: The boot package is the workhorse behind the bootstrapping methods, but the forecast method is used for the time series modeling.