[R-sig-ME] starter values

Martin Maechler maechler at stat.math.ethz.ch
Tue Nov 19 19:44:33 CET 2013


>>>>> Arnold Reynaldi <a.reynaldi at student.unsw.edu.au>
>>>>>     on Tue, 19 Nov 2013 13:15:50 +0000 writes:

    > Hi there, The model is biexponential decay. So the
    > assumption here is that in your data, you have 2
    > sub-populations that decay with different rate. A1 is the
    > initial number of your first sub-population and it will
    > decay with a rate of lrc1. On the other hand, A2 is your
    > second initial number of your second sub-population with
    > decay rate of lrc2.

    > As for the starting value, I believe that SSbiexp will
    > determine the starting value automatically. Just use this
    > code :

    > fit1 <- nlmer(kosten ~ SSbiexp(hm, np, A1, lrc1,A2,lrc2) ~
    > 0 + A1 + lrc1 + A2 + lrc2 + (0+A1+lrc1+A2+lrc2|j) +
    > (0+A1+lrc1+A2+lrc2|o), d))

There's more to it:

First, SSbiexp  has 5, not 6 arguments, so you'd need
 SSbiexp(np, A1, lrc1,A2,lrc2) 
or
 SSbiexp(hm, A1, lrc1,A2,lrc2) 

or their sum; but the sum won't work directly, because currently nlmer()
has the restriction that the nonlinear formula part must -- when
evaluated -- not only give a numeric vector, but that vector
must have a "gradient" attribute, a matrix.

And then, your data is *increasing*, not decaying, as Arnold
nicely said,  so a SSbiexp() model will not work.

To the last question: *if* your data were decaying, then you
could use  getInitial() {found on the help page of SSbiexp() !!!}
as follows,

getInitial(kosten ~ SSbiexp(hm, A1, lrc1,A2,lrc2), data=d)

but indeed, this gives an error, because really
a *decaying* exponential model definitely does not fit your data:

plot(kosten ~hm, d)
plot(kosten ~np, d) # similar: exponential *growth* rather


Martin Maechler, ETH Zurich


    > ________________________________________ 

    >> From: r-sig-mixed-models-bounces at r-project.org [r-sig-mixed-models-bounces at r-project.org] on behalf of Arndt Kunick [AKunick at gmx.de]
    >> Sent: Tuesday, November 19, 2013 10:56 PM
    >> To: r-sig-mixed-models at r-project.org
    >> Subject: [R-sig-ME] starter values
    >> 
    >> Dear R-user,
    >> I want to fit a nonlinear mixed model with the following formula (see below)
    >> 
    >> fit1 <- nlmer(kosten ~ SSbiexp(hm, np, A1, lrc1,A2,lrc2) ~ 0 + A1 + lrc1 + A2 + lrc2 +
    >>           (0+A1+lrc1+A2+lrc2|j) + (0+A1+lrc1+A2+lrc2|o), start = c(A1 = , lrc1 = , A2 = , lrc2 = ), d))
    >> 
    >> Thereby I have a problem with determine appropriate starter values for the parameters of the function SSbiexp.
    >> Regarding SSbiexp my questions are:
    >> 
    >> What is the meaning of the parameters A1, lrc1, A2 and lrc2?
    >> How can I deduce appropriate starter values?
    >> Exists there documentation for self-starter functions in lme4?
    >> 
    >> I am looking forward to hear from you!
    >> 
    >> With kind regards,
    >> 
    >> Anton



More information about the R-sig-mixed-models mailing list