Learn R Programming

FlexParamCurve (version 1.4-3)

posnegRichards.calls: List of calls for fitting 33 SSposnegRichards models in nlsList

Description

The posnegRichards.calls list has two components of 17 and 16 rows and 1 column, respectively, called 'Examples of calls for FlexParamCurve models that estimate parameter m' (models with 4 estimable first curve parameters) and "Examples of calls for FlexParamCurve models that fix parameter m" (models with 3 estimable second curve parameters, i.e. M is fixed to value in $pnmodelparams$. Individual calls can be accessed by indexing first the component number and then the model number - see examples below. Note that model 17 is formulated differently (see SSposnegRichards)

Usage

data(posnegRichards.calls)

Arguments

Details

A list object to provide users with examples of how to fit 33 different nlsList models using the selfStart function SSposnegRichards.

Examples

Run this code
# extract the call for fitting a nls model with 8-parameter double-Richards curve (model 1)
data(posnegRichards.calls)
data(posneg.data)
#for an example just fit a subset of the data, 3 group levels (individuals)
   data <- subset(posneg.data, as.numeric(row.names (posneg.data) ) < 40)
 
modtofit <- as.character( posnegRichards.calls [[2]] [row.names(posnegRichards.calls [[2]]) == "22",] )
#change the data source
modtofit <- sub("posneg.data","data",modtofit)
modtofit <- parse(text = modtofit)
modpar(posneg.data$age, posneg.data$mass, pn.options = "myoptions") #create list for fixed parameters
eval(modtofit)
richardsR22.lis

# view call for model 1
posnegRichards.calls [[1]] [row.names(posnegRichards.calls [[1]]) == "1",]

# view call for model 21
posnegRichards.calls [[2]] [row.names(posnegRichards.calls [[2]]) == "21",]

Run the code above in your browser using DataLab