locglmfit: Local generalized linear fitting

Description Usage Arguments Value Examples

Description

Local polynomial estimator for the psychometric function (PF) and eta function (PF transformed by link) for binomial data; also returns the Hat matrix. Actual calculations are done in LOCGLMFIT_PRIVATE or LOCGLMFIT_SPARSE_PRIVATE depending on the size of the data set. Here the data are split into several parts to speed up the calculations.

Usage

1
locglmfit( xfit, r, m, x, h, returnH = FALSE, link = c( "logit" ), guessing = 0, lapsing = 0, K = 2, p = 1, ker = c( "dnorm" ), maxiter = 50, tol = 1e-6 )

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

value

Object 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

1
2
3
4
data( "01_Miranda" )
xnew = 1.2 * (0:99)/99+0.1
h <- 0.2959
fit <- locglmfit( xnew, example01$r, example01$m, example01$x, h )

Example output

Loading required package: PolynomF
Loading required package: SparseM

Attaching package: 'SparseM'

The following object is masked from 'package:base':

    backsolve

modelfree documentation built on May 2, 2019, 6:07 p.m.