recfilter

recfilter(N, Z, sig2e, sig2v, xguess, muone, rho, beta, alpha, gamma)

RECFILTER Forward recursive filter for the mixed binary/continuous learning model

Usage:
[xhat, sigsq, xhatold, sigsqold] = recfilter(N, Z, sig2e, sig2v, …

xguess, muone, rho, beta, alpha, gamma)

Inputs:

N : 1xT double - binary/count observations (number correct per trial) – required Z : 1xT double - continuous observations (e.g. reaction time) – required sig2e : double - RT observation noise variance – required sig2v : double - state (random-walk) variance – required xguess : double - initial state guess x(1) – required muone : double - logit of background (chance) probability – required rho : double - state AR(1) coefficient – required beta : double - RT observation slope – required alpha : double - RT observation intercept – required gamma : double - binary observation state weight – required

Outputs:

xhat : 1xT+1 double - posterior mode x{k|k} sigsq : 1xT+1 double - posterior variance SIG^2{k|k} xhatold : 1xT+1 double - one-step prediction x{k|k-1} sigsqold : 1xT+1 double - one-step prediction variance SIG^2{k|k-1}

Notes

Prints a diagnostic and returns zeros if x_newtonsolve fails to converge at any time step.

See also: backest, x_newtonsolve, mixedlearningcurve

∿∿∿ Prerau Laboratory MATLAB Codebase · sleepEEG.org ∿∿∿