binomfit_lims {modelfree}R Documentation

Parameter estimates for a psychometric function with FIXED guessing and lapsing rates

Description

This function fits a binomial generalised linear model with fixed guessing and lapsing rates.

Usage

binomfit_lims( r, m, x, p = 1, link = "logit", guessing = 0, lapsing = 0, K = 2 )

Arguments

r

number of successes at points x

m

number of trials at points x

x

stimulus levels

p

(optional) degree of the polynomial; default is p = 1

link

(optional) name of the link function; default is "logit"

guessing

(optional) guessing rate; default is 0

lapsing

(optional) lapsing rate; default is 0

K

(optional) power parameter for Weibull and reverse Weibull link; default is 2

Value

⁠b ⁠ vector of estiamted coefficients for the linear part

⁠fit ⁠ glm object to be used in evaluation of fitted values

Examples

data("Carcagno")
x = Carcagno$x
r = Carcagno$r
m = Carcagno$m
plot( x, r / m, xlim = c( 1.95, 4.35 ), ylim = c( 0.24, 0.99 ), type = "p", pch="*" )
guess = 1/3; # guessing rate
laps = 0; # lapsing rate
val <- binomfit_lims( r, m, x, link = "probit", guessing = guess, lapsing = laps )
numxfit <- 199 # Number of new points to be generated minus 1
xfit <- (max(x)-min(x)) * (0:numxfit) / numxfit + min(x)
# Plot the fitted curve
pfit<-predict( val$fit, data.frame( x = xfit ), type = "response" )
lines(xfit, pfit )


[Package modelfree version 1.2 Index]