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

View source: R/panel.psyfun.R

panel.psyfunR Documentation

Panel Function for Adding Psychometric Function Fit to Each Panel

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

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

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 Aug. 19, 2023, 5:11 p.m.