computeModel: Calculates proximal/distal model

Description Usage Arguments Value Author(s) See Also Examples

Description

Calulates a realization of a proximal/distal model for a specified sequence of trials and paramter values. Use the verbose parameter to include underlying model components (distal and proximal estimates, weights, uncertainties and signal-reward association) in addition to the mean estimate.

Usage

1
2
  computeModel(x, mFast, mSlow, n, g = 0, h,
    tau = 1/TV_DAY, threshold = 0, verbose = TRUE)

Arguments

x

Object of class TimedVector specifying trials including whether signal was rewarded/unrewarded and times

mFast

Learning rate of proximal memory estimates

mSlow

Learning rate of distal memory estimates

n

Learning rate of uncertainty estimates

h

Decay rate of distal memory uncertainty estimator as time passes between trials

g

Association learning speed parameter

tau

Temporal scaling coefficient to translate time differences in x to fractional days. Defaults to 1/TV_DAY assuming that the times in x are expressed in minutes.

threshold

Difference in real time that must pass before deflation kicks in (used for testing)

verbose

true to include supporting estimates, weights, etc.

Value

Series of estimates

Author(s)

Chloe Bracis

See Also

calculateResponse, averageBySession

Examples

1
2
3
4
5
6
7
8
# Create 5 sessions of 20 rewarded trials,
# then 2 sessions of 20 unrewarded trials
trialTime = as.vector(sapply(0:6, function(x) 1:20 + x * TV_DAY))
trials =  TimedVector(c(rep(1, 5*20), rep(0, 2*20)), trialTime)

estimates = computeModel(trials, mFast = 0.7, mSlow = 0.1, n = 0.05,
						 g = 500, h = 0.2, verbose = TRUE)
plot(estimates, trials)

pdmod documentation built on May 2, 2019, 5:16 a.m.