Category: R
-
Learning about GLMs and GAMs in neuroscience
During my lecture on Wednesday, a few students asked me where they could learn more about generalized linear and additive models (GLMs and GAMs) and their applications to systems identification in neuroscience. Unfortunately, there are few textbooks in computational neuroscience, and most cover systems identification to some degree, most notably Marmarelis’ latest. To the best…
-
Smoothing a non-uniformly sampled surface
Working with 2d data defined on a grid is pretty straightforward in Matlab; you can easily visualize the data with imagesc and smooth it through convolution. Working with data sampled at non-uniform intervals is much trickier. Doing something as simple as visualizing it becomes a pain. One way of getting around this is to resample…
-
Hamiltonian Monte Carlo
I’ve been getting more into MCMC methodology recently. There’s a paper published this year by Ahmadian, Pillow & Paninski on different efficient MCMC samplers in the context of decoding spike trains with GLMs. The same methods could potentially be used, of course, for other purposes, like tracking receptive fields. Of particular interest is a remarkably…
-
Estimating a PSTH with Bayesian splines (BARS)
The PSTH (post-stimulus time histogram) summarizes the timing of neuronal spikes following a stimulus. When few trials are available, or the neuron being recorded seldom fires, the PSTH can be quite noisy. Thus, the PSTH is frequently smoothed with a Gaussian kernel — for example, to reliably estimate the latency of the response. It is…
-
Gibbs sampling made easy – JAGS, RKWard, CODA
I’ve used OpenBUGS for Gibbs sampling in the past, and while it’s a powerful piece of software, I hate OpenBUGS’ GUI, especially since it runs only on Windows. JAGS is an alternative Gibbs sampling program that uses an OpenBUGS-like syntax and runs on the command line. You can call JAGS in R through the rjags…