Learn R Programming

modelfree (version 1.0-2)

locglmfit_private: Local generalized linear fitting with usual (non-sparse) matrices

Description

THIS IS AN INTERNAL FUNCTION: USE LOCGLMFIT FOR BEST RESULTS. Fisher scoring method for local polynomial estimator of a psychometric function (PF).

Usage

locglmfit_private( xfit, r, m, x, h, returnH, link, guessing, lapsing, K, p, ker, maxiter, tol )

Arguments

xfit
points in which to calculate the estimate
r
number of successes in points x
m
number of trials in points x
x
stimulus values
h
bandwidths
returnH
Boolean; Return or not the hat matrix H? default is TRUE
link
name of the link function to be used; 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 p = 1
ker
kernel function for weights; default "dnorm"
maxiter
maximum number of iterations in Fisher scoring; default is 50
tol
tolerance level at which to stop Fisher scoring; default is 1e-6

Value

  • valueObject with 2 or 3 components: pfit: value of the local polynomial estimate at points xfit etafit: estimate of eta (link of pfit) H: hat matrix (OPTIONAL)

Examples

Run this code
data( "01_Miranda" )
xnew = 1.2 * (0:99)/99+0.1
h <- 0.2959
fit <- locglmfit_private( xnew,  example01$r,  example01$m, example01$x, h, FALSE, "logit_link", 0, 0, 2, 1, "dnorm", 50, 1e-6)

Run the code above in your browser using DataLab