Skip to content

algal nonlinear mixed effects problem

4 messages · Reinhold Kliegl, Ben Bolker

#
Thanks, Ben, for the illustration of how to use derive(), deparse(),
and eval() for setting up such functions. The following is based on
lme4_0.999999-0.

I modified Ben's attempt at a fit in two ways to get convergence.
(1) The start argument threw an Error; I provide the values in a
vector rather than a list. This might be related to differences
between nlmer implementations.
(2) The start value for asymp.R2 had to be moved away from 0.

The result suggests that there is no reliable evidence for the
variance component associated with "Individual asymp.R1"

A part of the protocol is listed below.
Happy New Year to everyone.

Reinhold Kliegl

Here is the protocol:
+   X ~ fpl(Day, asymp.L, asymp.R1, asymp.R2, asymp.R3, xmid, scale) ~
+          asymp.R1|Individual,
+      start =  list(nlpars=c(asymp.L=0.7,
+      asymp.R1=0.6,asymp.R2=0,asymp.R3=0,xmid=5,scale=1)),data=d)
Fehler: length(start$fixef) > 0 is not TRUE
+   X ~ fpl(Day, asymp.L, asymp.R1, asymp.R2, asymp.R3, xmid, scale) ~
+          asymp.R1|Individual,
+      start =  c(asymp.L=0.6,
asymp.R1=0,asymp.R2=0,asymp.R3=0,xmid=5,scale=1),data=d)
Fehler in mer_finalize(ans) : Downdated X'X is not positive definite, 5.
+   X ~ fpl(Day, asymp.L, asymp.R1, asymp.R2, asymp.R3, xmid, scale) ~
+          asymp.R1|Individual,
+      start =  c(asymp.L=0.6,
asymp.R1=.1,asymp.R2=0,asymp.R3=0,xmid=5,scale=1),data=d)
Nonlinear mixed model fit by the Laplace approximation
Formula: X ~ fpl(Day, asymp.L, asymp.R1, asymp.R2, asymp.R3, xmid,
scale) ~      asymp.R1 | Individual
   Data: d
   AIC   BIC   logLik deviance
 16.11 32.02 -0.05555   0.1111
Random effects:
 Groups     Name     Variance   Std.Dev.
 Individual asymp.R1 8.9101e-22 2.985e-11
 Residual            2.0575e-03 4.536e-02
Number of obs: 54, groups: Individual, 9

Fixed effects:
           Estimate Std. Error t value
asymp.L  -2.173e+02  2.187e+05  -0.001
asymp.R1  6.140e+01  5.002e+04   0.001
asymp.R2 -1.917e-02  4.370e+00  -0.004
asymp.R3 -1.207e-01  2.752e+01  -0.004
xmid      6.152e+03  6.167e+06   0.001
scale     4.807e+03  3.610e+06   0.001

Correlation of Fixed Effects:
         asym.L asy.R1 asy.R2 asy.R3 xmid
asymp.R1 -0.357
asymp.R2 -0.677 -0.446
asymp.R3 -0.677 -0.446  1.000
xmid     -1.000  0.357  0.677  0.677
scale    -0.597  0.962 -0.185 -0.185  0.597
On Mon, Dec 31, 2012 at 10:09 PM, Ben Bolker <bbolker at gmail.com> wrote:
#
I put up an example data set from modeling working-memory accuracy as
a negative exponential function of presentation time and
working-memory load with nlme() and nlmer() at the Potsdam Mind
Research Repository (http://read.psych.uni-potsdam.de/pmr2/ ) under "R
Playground"; click at: Modeling Time-Accuracy Functions with nlmer().
(I still have to graduate to RPubs.)

Finally, a small correction of a typo in my previous post: I changed
the start value of "asymp.R1" (not of "asymp.R2"), as shown in the
protocol.

On Tue, Jan 1, 2013 at 11:17 AM, Reinhold Kliegl
<reinhold.kliegl at gmail.com> wrote:
#
On 13-01-01 05:17 AM, Reinhold Kliegl wrote:
The results are crazy, though -- take a look at the fixed effect
coefficients, or the predicted values ...
#
I agree that the estimates are not acceptable; I was just trying to
show that one can get rid of the nlmer() error messages. I also put up
data to show that, in principle, one can get interpretable results
with nlmer() for "well-behaved" data, but apparently the program is
not quite ready for prime time.

As far as the present set of data is concerned, first I would probably
remove the asymp.R1 variance component, but I am not sure in which
direction to take the model from there. I doubt that the logistic
function is a good reference for all three groups; I only see the
logistic function justified for the t2-group. I know about "borrowing
strength", but in this case, I would probably rather borrow strength
to fit the t2-group to the other two. I did not study your ADMB
results in detail, but if your happy with them, this probably is a
defensible solution.
On Tue, Jan 1, 2013 at 8:30 PM, Ben Bolker <bbolker at gmail.com> wrote: