frair_fit_methods {frair}R Documentation

frair methods

Description

Documentation for methods for class frfit

Usage

## S3 method for class 'frfit'
print(x, ...)
## S3 method for class 'frfit'
plot(x, xlab=x$xvar, ylab=x$yvar, ...)
## S3 method for class 'frfit'
lines(x, tozero=FALSE, ...)

Arguments

x

Output from a call to frair_fit.

xlab

Label for the x-axis.

ylab

Label for the y-axis.

tozero

A logical. Should the line be drawn to the origin? See Details.

...

Other items passed to underlying functions.

Details

This documents standard methods for FRAIR objects of class frfit. However, because standard naming conventions have been used, some undocumented utility functions might also work (e.g. coefficients)

lines only adds lines to an existing plot, so an active graphics device needs to be present. lines draws the curve for the fitted response evaluated at values:

seq(from=min(x$x), to=max(x$x), length.out = 50) or

seq(from=0, to=max(x$x), length.out = 50) if tozero is TRUE.

If the supplied function is undefined at zero (and tozero is TRUE), then lines will plot lines to a small, non-zero number (1e-04) instead (with a warning). Clearly the intention here is to provide a nice-looking representation of the fitted curve and it is up to the user to determine why their desired curve is undefined at zero.

Author(s)

Daniel Pritchard

See Also

frair_fit, lines.

Examples

data(gammarus)
outII <- frair_fit(eaten~density, data=gammarus, response='rogersII', 
        start=list(a = 1.2, h = 0.015), fixed=list(T=40/24))

# Visualise fit
plot(outII, pch=20, col=rgb(0,0,0,0.2), xlim=c(0,30))
lines(outII)

[Package frair version 0.5.100 Index]