EstimateResponseDelayByMomentMatching: Estimates the response delay by cross correlating the...

Description Usage Arguments Value

View source: R/EstimateResponseDelayByMomentMatching.R

Description

A function that detects the delay of a response relative to the odor onset by finding the delay with maximum cross correlation of the given response rate timecourse, with that of the odor onset convolved with a decaying exponential. The parameters of the exponential are found by moment matching.

Usage

1
2
EstimateResponseDelayByMomentMatching(y, x0, verbose = FALSE, plot = FALSE,
  minDelay = 0, fitOdorProfileOnError = TRUE)

Arguments

y

A length T vector of the mean firing rate of the neuron in a series of bins.

x0

A binary length T vector indicating the odor window.

verbose

Whether to print out the results

plot

Whether to plot the delayed exponential on top of the firing rate.

minDelay

The minimum delay value that can be used.

fitOdorProfileOnError

Whether to fit the odor profile itself if learning the filter parameters failed.

Value

A list consisting of

a0

The amplitude of the exponential.

a1

The autoregressive coefficient of the exponential

tau

The time constant of the exponential. a1 = exp(-1/tau).

l0

The baseline firing rate.

delay

The delay with the highest correlation.

status

A string. "OK" if the parameters could be learned, "ERROR" if not.


sfrechter/physplit.analysis documentation built on May 29, 2019, 8:02 p.m.