Skip to content
Prev 313107 / 398503 Next

nlme starting values are not the correct length

Hi Petr,
Thanks for the email, the number of parameters is not 3 because I am trying to fit a parameter for each treatment level, therefore the start vector changes depending on the fixed statement (see below). 

I finally got some of these to work....but for some reason I cannot run a complete model with both fixed effects and interactions (Species*Fert), I still couldn't get the syntax for the start vector! 

Thanks again,
Lara

All these work:
<unfert <- subset(lightresponse, Fert==0)
<model.cov4<-nlme(Photo~A*(1-exp(-lC*PARi/A))-B,fixed=A+B+lC~Species,random=A+B+lC~1,data=unfert,start=c(24.89,0,0,0,1.78,0,0,0,0.06,0,0,0))
<plot(augPred(model.cov4,outer=T))
#Here is the summary of the non-linear mixed model:
<summary(model.cov4)

<fert <- subset(lightresponse, Fert==1)
<model.cov5<-nlme(Photo~A*(1-exp(-lC*PARi/A))-B,fixed=A+B+lC~Species,random=A+B+lC~1,data=fert,start=c(24.89,0,0,0,1.78,0,0,0,0.06,0,0,0))
<plot(augPred(model.cov5))
#Here is the summary of the non-linear mixed model:
<summary(model.cov5)

<model.cov6<-nlme(Photo~A*(1-exp(-lC*PARi/A))-B,fixed=A+B+lC~Fert,random=A+B+lC~1,data=lightresponse,start=c(24.89,0,1.78,0,0.06,0))
<plot(augPred(model.cov6))
#Here is the summary of the non-linear mixed model:
<summary(model.cov6)

This one I am interested in but cannot figure out the start vector!

<model.nlme<-nlme(Photo~A*(1-exp(-lC*PARi/A))-B,fixed=A+B+lC~Species*Fert,random=A+B+lC~1,data=lightresponse,start=c(?????)

Also, once I have the summary of effects, how do I do contrasts for specific species differences?
I understand from this output that the p value is comparing each species with the baseline species, but how do I compare jg with sw for example? Is there a simple "Tukey" or family contrast for nlme method?

Fixed effects: A + B + lC ~ Species 
                   Value Std.Error  DF   t-value p-value
A.(Intercept)  24.132181  3.649618 281  6.612249  0.0000
A.Speciesjg    -4.233378  5.160757 281 -0.820302  0.4127
A.Specieslb     2.862573  5.161393 281  0.554612  0.5796
A.Speciessw     4.964391  5.344752 281  0.928835  0.3538
B.(Intercept)   1.523276  0.262774 281  5.796899  0.0000
B.Speciesjg     0.115693  0.372653 281  0.310457  0.7564
B.Specieslb     0.469510  0.372018 281  1.262062  0.2080
B.Speciessw     0.476496  0.380826 281  1.251220  0.2119
lC.(Intercept)  0.065695  0.005050 281 13.009079  0.0000
lC.Speciesjg   -0.009383  0.007155 281 -1.311311  0.1908
lC.Specieslb    0.009004  0.007178 281  1.254371  0.2107
lC.Speciessw   -0.002268  0.007369 281 -0.307801  0.7585
On Dec 6, 2012, at 12:52 AM, PIKAL Petr <petr.pikal at precheza.cz> wrote: