relBackgroundLL: Log-likelihood ratio of grouped responses being drawn from a...

Description Usage Arguments Value Note Author(s) References See Also Examples

Description

Compute the log-likelihood ratio of the grouped responses being obtained from a background distribution given its mean and variance.

Usage

1
relBackgroundLL(resp, groups, backMean, backVar)

Arguments

resp

response values

groups

grouping variables (will be treated as factors)

backMean

mean of the background distribution

backVar

variance of the background distribution

Value

log-likelihood ratio

Note

This is the log-likelihood ratio of the changes from background test (CBT). It is included here for comparison.

Author(s)

Peter N. Steinmetz <PeterNSteinmetz@steinmetz.org>

References

Steinmetz, P.N. & Thorp, C.K. (2013) Testing for effects of different stimuli on neuronal firing relative to background activity. Journal of Neural Engineering, in review.

See Also

fRatioStat,LL1WayAnova,sumSqCat

Examples

1
2
3
4
# calculate test statistic for one cluster
data(ef)
df<-subset(ef,clustId=='ch26cl3')
relBackgroundLL(df$absResp,df$race,mean(df$absBkg),var(df$absBkg))

Example output

[1] -4.875059

EffectsRelBaseline documentation built on May 2, 2019, 9:44 a.m.