Description Usage Arguments Details Value Author(s) References See Also Examples

A probit fit of a psychometric function with upper asymptote less than 1 is obtained by cycling between a fit with `glm`

using the `probit.lambda`

link and `optimize`

to estimate `lambda`

, 1 - the upper asymptotic value, until the log Likelihood changes by less than a pre-set tolerance.

1 2 |

`formula` |
a symbolic description of the model to be fit. |

`data` |
an optional data frame, list or enviroment (or object coercible by |

`NumAlt` |
integer indicating the number of alternatives (> 1) in the mafc-task. (Default: 2). |

`lambda.init` |
numeric, initial estimate of 1 - upper asymptote. |

`interval` |
numeric vector giving interval endpoints within which to search for |

`trace` |
logical, indicating whether or not to print out a trace of the iterative process. |

`tol` |
numeric, tolerance for ending iterations. |

`...` |
futher arguments passed to |

The psychometric function fit to the data is described by

*P(x) = 1/m + (1 - 1/m - λ) Φ(x)*

where *m* is the number of alternatives and the lower asymptote, *1 - λ* is the upper asymptote and *Φ* is the cumulative normal function.

returns an object of class ‘lambda’ which inherits from classes ‘glm’ and ‘lm’. It only differs from an object of class ‘glm’ in including an additional components, `lambda`

, giving the estimated minimum of `lambda`

. The degrees of freedom are reduced by 1 to take into account the estimation of `lambda`

.

Ken Knoblauch

Wichmann, F. A. and Hill, N. J. (2001) The psychometric function: I.Fitting, sampling, and goodness of fit. Percept Psychophys., 63(8), 1293–1313.

Yssaad-Fesselier, R. and Knoblauch, K. (2006) Modeling psychometric
functions in R. * Behav Res Methods.*, **38(1)**, 28–41. (for examples
with `gnlr`

).

`mafc`

, `glm`

,`glm.lambda`

, `probit.lambda`

, `family`

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 | ```
b <- 3.5
g <- 1/4
d <- 0.04
a <- 0.04
p <- c(a, b, g, d)
num.tr <- 160
cnt <- 10^seq(-2, -1, length = 6) # contrast levels
#simulated Weibull-Quick observer responses
truep <- g + (1 - g - d) * pweibull(cnt, b, a)
ny <- rbinom(length(cnt), num.tr, truep)
nn <- num.tr - ny
phat <- ny/(ny + nn)
resp.mat <- matrix(c(ny, nn), ncol = 2)
tst.glm <- glm(resp.mat ~ cnt, binomial(mafc.probit(1/g)))
pcnt <- seq(0.005, 1, len = 1000)
plot(cnt, phat, log = "x", ylim = c(0, 1), xlim = c(0.005, 1),
cex = 1.75)
lines(pcnt, predict(tst.glm, data.frame(cnt = pcnt), type = "response"), lwd = 2)
tst.lam <- glm.WH(resp.mat ~ cnt, NumAlt = 1/g, trace = TRUE)
lines(pcnt, predict(tst.lam, data.frame(cnt = pcnt),
type = "response"), lty = 2, lwd = 2)
``` |

Embedding an R snippet on your website

Add the following code to your website.

For more information on customizing the embed code, read Embedding Snippets.