logo

Model-free estimation of a psychometric function

bandwidth_optimal

Back to Functions

h = bandwidth_optimal(ptrue,r,m,x,H,link,guessing,lapsing,K,p,ker,maxiter,tol,method);

Optimal bandwidth for a local polynomial estimate of the psychometric function with specified guessing and lapsing rates. The difference between this function and bandwidth_cross_validation is that here the true psychometric function is known.

Input:

ptrue: the true function; vector with the value of the true psychometric function at each stimulus level x

r: number of successes at points x

m: number of trials at points x

x: stimulus levels

H: search interval

Optional input:

link: name of the link function; default is 'logit'

guessing: guessing rate; default is 0

lapsing: lapsing rate; default is 0

K: power parameter for Weibull and reverse Weibull link; default is 2

p: degree of the polynomial; default is 1

ker: kernel function for weights; default is 'normpdf'

maxiter: maximum number of iterations in Fisher scoring; default is 50

tol: tolerance level at which to stop Fisher scoring; default is 1e-6

method: loss function to be used: choose from: 'ISEeta', 'ISE', 'deviance'; by default all possible values are calculated

Output:

h: optimal bandwidth for the chosen method; if no method is specified, then it is three-row vector with entries corresponding to the estimated bandwidths on a p-scale, on an eta-scale and for deviance

Back to Functions