Learn R Programming

PsumtSim (version 0.4)

simCatResp: Simulates Poisson distributed responses to stimuli.

Description

Simulates a set of Poisson responses to stimuli grouped into categories and corresponding background counts unrelated to stimulation.

Usage

simCatResp(bkgRate, respRates, numRespsPerCat)

Arguments

bkgRate
Mean firing rate during a background interval, unrelated to stimulus presentation.
respRates
Mean firing rates during a response period, one for each category.
numRespsPerCat
Number of repetitions (presentation of stimuli) in each category.

Value

Dataframe with columns for category label, background, and response counts for each trial.

See Also

simNormCatResp

Examples

Run this code
simCatResp(10.0,c(10,20,30),5)->sim1
anova(glm(resp~category,data=sim1),test='F')

Run the code above in your browser using DataLab