FitAllMultAddModels: Fit all multiplicative and additive models

View source: R/FitAllMultAddModels.R

FitAllMultAddModelsR Documentation

Fit all multiplicative and additive models

Description

Wrapper function to fit all 2K+1 models (multiplicative, additive, and nonperiodic).

Usage

FitAllMultAddModels(
  K,
  spikes,
  f.common.table,
  setup.pars,
  terminal.points,
  ct,
  user.defined.frequencies = NULL
)

Arguments

K

the number of frequency components in the largest model to fit.

spikes

a list of spike trains.

f.common.table

a table whose names contain the high-amplitude frequency components as computed by FindTopFrequencies().

setup.pars

a list of additional parameters for the likelihood function, computed by SetupLikelihoods().

terminal.points

a numeric vector containing the time points at which c(t) changes.

ct

a numeric vector containing the estimated piecewise constant intensity function c(t). The length of c(t) should be a whole number power of 2.

user.defined.frequencies

(= NULL) a numeric vector of length at least K containing the frequencies (in decreasing order of importance) to try in the model. By default this is NULL, and frequencies will be directly read from f.common.table.

Value

A list of length 3 is returned. The first item in the list is a list of frequency estimates for each model. The second item in the list is a list of phase estimates for each model. The third item in the list is a list of eta/gamma estimates and fit criteria for each model.


dpwynne/mmnst documentation built on Aug. 1, 2023, 8:08 a.m.