FindCt: Find c(t)

View source: R/FindCt.R

FindCtR Documentation

Find c(t)

Description

Compute the piecewise constant estimate of the intensity function, c(t), for each spike train

Usage

FindCt(spikes, t.start, t.end, lambda, J, PSTH = FALSE)

Arguments

spikes

a list of spike trains.

t.start

the starting time of the recording window; the default value is 0.

t.end

the ending time of the recording window.

lambda

a penalty term used in estimating the piecewise constant intensity function c(t). Larger values of lambda result in "smoother" estimates.

J

the maximum size of the tree in the initial dyadic partitioning used to estimate c(t). The final estimate of c(t) will have 2^J values.

PSTH

if TRUE, will aggregate the spikes across all trials in each and every bin and then estimate c(t) using the post-stimulus-time histogram. If FALSE, will estimate a c(t) for each trial and average the c(t) estimates.

Value

A list of length 2 is returned. If PSTH=TRUE, the first item in the list (ct.avg) is the single estimate of c(t) based on the PSTH (scaled appropriately so that it integrates to the average number of spikes per trial), and the second item in the list (ct.best) is a matrix, containing one row per spike train / trial, whose rows each replicate ct.avg. If PSTH=FALSE, each row of ct.best contains the c(t) estimates for the individual spike trains / trials, and ct.avg contains the single estimate of c(t) obtained by averaging the ct.best estimates.


dpwynne/mmnst documentation built on Aug. 1, 2023, 8:08 a.m.