lwmodel.sim {FSA}R Documentation

Plots a length-weight power function evaluated at a vector of lengths with slider bars to change parameter values.

Description

Plots a length-weight power function evaluated at a vector of lengths with or without observed data. A slider object is included so that the parameter values can be adjusted. This function can be used to explore the effects of a parameter on the model or for visually fitting a length-weight model to a set of data.

Usage

lwmodel.sim(x=NULL,y=NULL,wt.max=50)

Arguments

x A numeric vector of observed ages. See details.
y A numeric vector of observed lengths. See details.
wt.max A numeric indicating the maximum weight for the y-axis scale.

Details

If the x and y arguments are used then the observed data in these vectors will be plotted and the length-weight model will be superimposed. If these arguments are left as NULL then the length-weight model will be shown without any observed data. This is useful for exploring the effects of different parameter values on the model dynamics.

A slider object is created from which the parameters of the model can be changed. The model parameters are defined in the FSA text. In addition, the minimum and maximum length over which to evaluate the length-weight model is controlled by the slider.

The slider object has a tendency to “disappear” when focus is put on the plot. The slider object can be brought back to the foreground by finding the object listed on the Windows toolbar. The slider object should be “exit”ed when finished exploring a model.

The range of values allowed for each of the parameters were chosen to allow a wide variety of model values. However, it is highly likely that these ranges do not encompass every possible set of values that a user may which to view.

Value

None. An interactive graphic is produced.

Author(s)

Derek H. Ogle, dogle@northland.edu

Examples

## Not run: 
## This example cannot be run by examples() but should work in an interactive R session
# Exploration of model dynamics
## Not run: lwmodel.sim()
# Visual fit of length-weight model to Grafton Lake Perch data
## Not run: data(PerchGL)
## Not run: lwmodel.sim(x=PerchGL$FL,y=PerchGL$W)

[Package FSA version 0.0-13 Index]