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

Description Usage Format Details Examples

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

1

Format

This object of class list containing the components:

Examples of calls for FlexParamCurve models that estimate parameter m

a list of 16 possible reductions (nos. 1-16) of the FlexParamCurve double-Richards model that estimate parameter m. Also includes a custom model (17; see SSposnegRichards).

Examples of calls for FlexParamCurve models that fix parameter m

a list of 16 possible reductions (nos. 21-36) of the FlexParamCurve double-Richards model that do not estimate parameter m but instead fix it to a mean across the dataset or user-specified value.

Details

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

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
# see all possible calls
posnegRichards.calls
# extract the call for fitting a nls model with 8-parameter double-Richards curve (model 1)
#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)
#create list for fixed parameters
modpar(posneg.data$age, posneg.data$mass, pn.options = "myoptions")
#create a new nlsList object called richards22.lis
eval(modtofit)
#view object
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",]

Example output

Loading required package: nlme
[[1]]
                                                                                            Examples of calls for FlexParamCurve models that estimate parameter m
1   richardsR1.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,Rk=Rk,Ri=Ri,RM=RM,modno=1,pn.options='myoptions'),data=posneg.data)
2         richardsR2.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,Rk=Rk,Ri=Ri,modno=2,pn.options='myoptions'),data=posneg.data)
3                     richardsR3.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,Ri=Ri,RM=RM,modno=3,pn.options='myoptions'),data=posneg.data)
4               richardsR4.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,RM=RM,modno=4,pn.options='myoptions'),data=posneg.data)
5                           richardsR5.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RM=RM,modno=5,pn.options='myoptions'),data=posneg.data)
6         richardsR6.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,Ri=Ri,RM=RM,modno=6,pn.options='myoptions'),data=posneg.data)
7               richardsR7.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,Rk=Rk,Ri=Ri,RM=RM,modno=7,pn.options='myoptions'),data=posneg.data)
8         richardsR8.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,Rk=Rk,RM=RM,modno=8,pn.options='myoptions'),data=posneg.data)
9                     richardsR9.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,Rk=Rk,RM=RM,modno=9,pn.options='myoptions'),data=posneg.data)
10                        richardsR10.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,Ri=Ri,modno=10,pn.options='myoptions'),data=posneg.data)
11                  richardsR11.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,modno=11,pn.options='myoptions'),data=posneg.data)
12                              richardsR12.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,modno=12,pn.options='myoptions'),data=posneg.data)
13            richardsR13.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,Ri=Ri,modno=13,pn.options='myoptions'),data=posneg.data)
14                  richardsR14.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,Rk=Rk,Ri=Ri,modno=14,pn.options='myoptions'),data=posneg.data)
15            richardsR15.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,Rk=Rk,modno=15,pn.options='myoptions'),data=posneg.data)
16                        richardsR16.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,Rk=Rk,modno=16,pn.options='myoptions'),data=posneg.data)
17      richardsR17.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=1,Infl=Infl,M=M,RAsym=RAsym,Ri=Ri,RM=RM,modno=17,pn.options='myoptions'),data=posneg.data)

[[2]]
                                                                                              Examples of calls for FlexParamCurve models that fix parameter m
21 richardsR21.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,Rk=Rk,Ri=Ri,RM=RM,modno=21,pn.options='myoptions'),data=posneg.data)
22       richardsR22.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,Rk=Rk,Ri=Ri,modno=22,pn.options='myoptions'),data=posneg.data)
23                   richardsR23.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,Ri=Ri,RM=RM,modno=23,pn.options='myoptions'),data=posneg.data)
24             richardsR24.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,RM=RM,modno=24,pn.options='myoptions'),data=posneg.data)
25                         richardsR25.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RM=RM,modno=25,pn.options='myoptions'),data=posneg.data)
26       richardsR26.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,Ri=Ri,RM=RM,modno=26,pn.options='myoptions'),data=posneg.data)
27             richardsR27.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,Rk=Rk,Ri=Ri,RM=RM,modno=27,pn.options='myoptions'),data=posneg.data)
28       richardsR28.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,Rk=Rk,RM=RM,modno=28,pn.options='myoptions'),data=posneg.data)
29                   richardsR29.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,Rk=Rk,RM=RM,modno=29,pn.options='myoptions'),data=posneg.data)
30                         richardsR30.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,Ri=Ri,modno=30,pn.options='myoptions'),data=posneg.data)
31                   richardsR31.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,modno=31,pn.options='myoptions'),data=posneg.data)
32                               richardsR32.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,modno=32,pn.options='myoptions'),data=posneg.data)
33             richardsR33.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,Ri=Ri,modno=33,pn.options='myoptions'),data=posneg.data)
34                   richardsR34.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,Rk=Rk,Ri=Ri,modno=34,pn.options='myoptions'),data=posneg.data)
35             richardsR35.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,Rk=Rk,modno=35,pn.options='myoptions'),data=posneg.data)
36                         richardsR36.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,Rk=Rk,modno=36,pn.options='myoptions'),data=posneg.data)

[1] modpar will attempt to parameterize your data using the following sequential procedures:
[1]   (1) Extract parameter estimates for 8-parameter double-Richards curve in nls
[1]   (2) Use getInitial to retrieve parameter estimates for 8-parameter double-Richards curve
[1]   (3) Extract parameter estimates for 4-parameter Richards curve in 
[1]   (4) Use getInitial to retrieve parameter estimates for 4-parameter Richards curve
[1] if any approaches are successful, modpar will return these and terminate at that stage
[1]  
[1] (1) Status of 8-parameter double-Richards curve fit in nls:
[1] ....8-parameter nls fit successful
$Asym
[1] 4443.135

$K
[1] 0.0647125

$Infl
[1] 23.36873

$M
[1] 0.3802136

$RAsym
[1] -1126.358

$Rk
[1] 0.2112253

$Ri
[1] 104

$RM
[1] 0.7983006

Warning message:
1 error caught in nls(model, data = data, control = controlvals): singular gradient 
Call:
  Model: mass ~ SSposnegRichards(age, Asym = Asym, K = K, Infl = Infl, RAsym = RAsym, Rk = Rk, Ri = Ri, modno = 22, pn.options = "myoptions") | id 
   Data: data 

Coefficients:
      Asym          K     Infl     RAsym        Rk       Ri
2       NA         NA       NA        NA        NA       NA
1 4419.914 0.07903901 22.29135 -863.8538 0.1924496 104.7144
3 4564.960 0.05498156 24.71481 -518.1433 0.4276856 103.4670

Degrees of freedom: 26 total; 14 residual
Residual standard error: 8.239248
[1]  richardsR1.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,RAsym=RAsym,Rk=Rk,Ri=Ri,RM=RM,modno=1,pn.options='myoptions'),data=posneg.data)
17 Levels:                              richardsR12.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,M=M,modno=12,pn.options='myoptions'),data=posneg.data) ...
[1] richardsR21.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,RAsym=RAsym,Rk=Rk,Ri=Ri,RM=RM,modno=21,pn.options='myoptions'),data=posneg.data)
16 Levels:                               richardsR32.lis<-nlsList(mass~SSposnegRichards(age,Asym=Asym,K=K,Infl=Infl,modno=32,pn.options='myoptions'),data=posneg.data) ...

FlexParamCurve documentation built on May 1, 2019, 11:36 p.m.