psyfun.boot: Bootstrapping Standard Errors of Psychometric Function...

Description Usage Arguments Details Value Author(s) References Examples

View source: R/psyfun.boot.R

Description

A function that will run a bootstrap on the estimated parameters of a psychometric function fit given a model object.

Usage

1
psyfun.boot(obj, N = 100)

Arguments

obj

object inheriting from class ‘glm’ from a fit of a psychometric function

N

integer indicating number of bootstrap replications.

Details

The function computes new binomial responses based on the fitted probabilities of the model object for each bootstrap replication. A psychometric function is then fit to each one and the fitted coefficients returned as a bootstrap replicate.

Value

Returns a matrix with one row for each coefficient of the model and one column for each bootstrap replication.

Author(s)

Kenneth Knoblauch

References

Maloney, L. T. (1990) Confidence interval for the parameters of psychometric functions. Perception \& Psychophysics, 47(2), 127–134.

Foster, D.H., Bischof, W.F.(1997) Bootstrap estimates of the statistical accuracy of thresholds obtained from psychometric functions. Spatial Vision, 11(1), 135–139.

Treutwein, B., Strasburger, H. (1999) Fitting the psychometric function. Perception \& Psychophysics, 61(1), 87–106.

Examples

1
2
3
4
5
6
7
8
9
data(HSP)
SHR2 <- subset(HSP, Obs == "SH" & Run == "R2")
SHR2 <- within(SHR2, {
	nyes <- N * p/100
	nno <- N - nyes
	})
SHR2.glm <- glm(cbind(nyes, nno) ~ log(Q), binomial, SHR2)
### For a real problem, set N to 10000 or so
SHR2.boot <- psyfun.boot(SHR2.glm, 10)

Example output



MPDiR documentation built on May 2, 2019, 5:54 p.m.