model_treatment_log_poisson: Model average firing as a function treatment using...

View source: R/model_treatment_log_poisson.R

model_treatment_log_poissonR Documentation

Model average firing as a function treatment using log-poisson regression

Description

experiment: experiment dataset loaded with mema::load_experiment(...)

Usage

model_treatment_log_poisson(
  experiment,
  output_base = "intermediate_data/models",
  verbose = TRUE,
  ...
)

Details

extra ... arguments are passed to brms::brm(...)

returns: brmsfit from the brms package

Build a bayesian heirarchical model for the number of firings as a function of

exposure with a weight fixed at 1 => offset(log(exposure)) https://github.com/paul-buerkner/brms/issues/146

treatment as a fixed effect => treatment

average neuron firing rate as a random effet => (1|neuron_index)

assume a general linear model with log-poisson link

This uses the brms package front end to the stan bayesian modeling framework


momeara/mema documentation built on Nov. 4, 2022, noon