panel.psyfun: Panel Function for Adding Psychometric Function Fit to Each...

Description Usage Arguments Value Author(s) See Also Examples

View source: R/panel.psyfun.R

Description

Provides a panel function for use with xyplot from the lattice package so that a psychometric function will be fitted and plotted in each panel of a lattice plot similar to panel.lmline for fitting a linear regression line.

Usage

1
panel.psyfun(x, y, n, lnk = "logit", ...)

Arguments

x

vector of covariate values

y

vector of responses, usually proportion of correct responses

n

vector of integers specifying number of trial for each proportion in y

lnk

link function to use in fitting glm with binomial family (default is “logit”).

...

Other parameters passed from the formal arguments of the panel function.

Value

Nothing returned. Function just used for its side-effects of producing a graph within a panel function.

Author(s)

Kenneth Knoblauch

See Also

See also as lattice

Examples

1
2
3
4
5
6
7
lattice::xyplot(Pc ~ Phaseshift | WaveForm + TempFreq + 
	Direction, Vernier, layout = c(4, 2),
	panel = function(x, y, n = 20, ...) {
		lattice::panel.xyplot(x, y)
		panel.psyfun(x, y, 20, lnk = "probit")
	}
)

MPDiR documentation built on May 31, 2017, 4:18 a.m.