![]() |
Model-free estimation of a psychometric function |
|---|---|
| Home | Downloads | Demonstration | Documentation | Examples | Functions | Contacts |
|---|
locglmfit
[pfit,etafit,H] = locglmfit(xfit,r,m,x,h,link,guessing,lapsing,K,p,ker,maxiter,tol);Local polynomial estimator for the psychometric function and
etafunction (psychometric function transformed bylink) for binomial data; also returns the hat matrixH. Actual calculations are done inLOCGLMFIT_PRIVATEorLOCGLMFIT_SPARSE_PRIVATEdepending on the size of the data set. Here, the data are split into several parts to speed up the calculations.Input:
xfit: points at which to calculate the estimatepfit
r: number of successes at pointsx
m: number of trials at pointsx
x: stimulus levels
h: bandwidth(s)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 is1
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-6Output:
pfit: value of the local polynomial estimate at pointsxfit
etafit: estimate of eta (link ofpfit)
H: hat matrix