Carry out Poisson test on absolute number of spikes in odour response

poissonTestOdoursSF(x, odours = colnames(x), maxtrials = NA,
  test_each_odour_trial = FALSE, ...)

Arguments

x

An m x n odour response matrix for m trials of n odours

odours

Names of odours (defaults to colnames(x))

maxtrials

Maximum number of trials to consider (default => all)

test_each_odour_trial

Whether to test each odour trial individually against all blank trials.

...

Additional parameters passed to poisson.test

Value

p values from the Poisson test

Details

This function compares each odour trial with a matching control (i.e. blank) response. It is assumed that each odour column is matched to the blank column that most recently preceded it.

When test_each_odour_trial each single odour trial is compared with all of the blank trials (making an approoriate adjustment to the time base for the event counts, see Note in poisson.test docs).

See also

Examples

# calculate summary response for cell 100 for window of 700-1700 ms spikeresp=OdourResponseFromSpikes(Spikes[[100]][[1]], responseWindow=c(700,1700)) poissonTestOdoursSF(spikeresp, alternative="greater")
#> E2Hex GerAc Prpyl IPenA Et3HB Nonnl #> 6.250000e-02 4.882812e-04 1.000000e+00 5.000000e-01 1.000000e+00 5.000000e-01 #> CiVAc MetSl HexAc PeEtA AceAc EtHex #> 5.000000e-01 7.812500e-03 4.882812e-04 7.812500e-03 3.125000e-02 1.000000e+00 #> 2PnAc 5OdMx BeZal bCitr 1HxOl Frnsl #> 1.953125e-03 1.953125e-03 3.271484e-02 6.055832e-05 1.794100e-05 1.123047e-02 #> Cdvrn Sprmn Acoin MtAct AcAcd PrpnA #> 5.293956e-23 1.694066e-21 3.326928e-28 1.318597e-17 3.126926e-14 2.371421e-15 #> BtrAc Amnia Pyrdn PAcHd HCL36 PAcAc #> 6.501418e-16 1.258874e-27 2.528902e-17 2.980232e-08 1.490116e-08 3.814697e-06 #> Vingr Geosn VinGe PEtAm FlyFM EtAmn #> 4.656613e-10 2.384186e-07 1.110223e-16 1.455192e-11 7.880249e-01 1.916552e-01 #> MtAmn Ptscn Lnlol 23BTD #> 9.672852e-01 5.387607e-02 4.072647e-01 1.050198e-01
# NOT RUN { spikerespall=sapply(Spikes, function(x) OdourResponseFromSpikes(x[[1]], responseWindow=c(700,1700)), simplify = F) # significant response (either up or down) spikes.pval=sapply(spikerespall, poissonTestOdoursSF, simplify = F) # }