panel.psyfun {MPDiR} | R 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 |
lnk |
link function to use in fitting |
... |
Other parameters passed from the formal arguments of the |
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")
}
)
[Package MPDiR version 0.2 Index]