plot.pdmod: Plot model

Description Usage Arguments Author(s) Examples

Description

Plots a pdmod class (what's returned from computeModel with verbose = TRUE). The plots show the proximal and distal estimates, their corresponding uncertainties and weights, as well as the overall mean estimate.

Usage

1
2
  ## S3 method for class 'pdmod'
 plot(x, actual, n, ...)

Arguments

x

Object of class pdmod

actual

Actual rewards received

n

(optional) Only plot the last n values

...

Other arguments to plot

Author(s)

Chloe Bracis

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.