Learn R Programming

FlexParamCurve (version 1.4-3)

tern.data: Field data on growth of common terns $Sterna hirundo$

Description

The tern.data data frame has 1164 rows and 12 columns of records of the measured masses for common tern chicks between 1 and 30 days of age collected at at Grays Beach, MA, in 1973 (Nisbet 1975) and Monomoy, MA, in 1975 (Nisbet et al. 1978)

Usage

data(tern.data)

Arguments

source

Nisbet, I.C.T. (1975) Selective effects of predation in a tern colony. Condor, 77, 221-226. Nisbet, I.C.T., Wilson, K.J. & Broad, W.A. (1978) Common Terns raise young after death of their mates. Condor, 80, 106-109.

Details

Data were collected as outlined in Nisbet (1975)[Grays Beach, MA, 1973] and Nisbet et al.(1978) [Monomoy, MA, 1975]. Please contact Ian Nisbet for use in collaborations.

Examples

Run this code
require(stats); require(graphics)
data(tern.data)
modpar(tern.data$ckage, tern.data$weight, force4par = TRUE, pn.options = "myoptions") #create pnmodelparams for fixed parameters
plot(weight ~ ckage, data = tern.data, subset = bandid == tern.data$bandid[1],
     xlab = "Chick age (day)", las = 1,
     ylab = "Chick mass (g)",
     main = "tern.data and fitted curve (Chick #156 only)")
fm1 <- nls(weight ~ SSposnegRichards(ckage,Asym=Asym,K=K,Infl=Infl,modno=32, pn.options= "myoptions"),
           data = tern.data, subset = bandid == tern.data$bandid[1])
ckage <- seq(0, 30, length.out = 101)
lines(ckage, predict(fm1, list(ckage = ckage)))

Run the code above in your browser using DataLab