Skip to content
Prev 11346 / 20628 Next

Formula and Start-values Any help at all?… Yes!

Partial conclusions:

Ben's two observations have been a tremendous help to me.  Use of nlmer
following (1) and (2) allow me to get a solution in the case of my original problem,
although some questions of interpretation still remain.

(1) Use single values as starting values, i.e., the mean/central values of the parameters

(2) including sensitivities to parameters only (not to additional independent variables)
in the deriv() function.

In summary for this problem, ... 
=> Getting (apparently) good  x0.est values  from ylong ~ ( a*(xlong  - x0.est) )
is the major accomplishment of nlmer()...  one can work out the other questions.
=> Such success is likely to be data-set dependent since the problem can easily
be ill conditioned (I surmise). 

==============================================================
Now, 
If anyone has been following the discussion of the idealized examples, there are
some flaws in what's in the correspondence that remain 
and that confuse my discussion and his for those who might follow.
Ask me for 

(a) Importantly, the non-linear formula is best expressed 
xinterform <- ~( a*(xlong  - x0.est) )
(note sign of x0.est is changed and the parentheses
are all-important. a*xlong - x0.est is linear.)

(b) Analysis of the idealized problem suggests that it is 
poorly conditioned, with the effects of x0.est and a being 
too much correlated.  
=> I surmise that the success of my use of nlmer with
the original data derives from the probability distributions 
involved.  More work would be needed to quantify this
understanding.


(c) Details -- I used "outer" incorrectly to express 
for (i in 1:10 ) yun[,i] = yun[,i]*(1+rnorm(100,0.15,0.1))
for (j in 1:100 ) yun[j,] = yun[j,]*(1+rnorm(10,0.15,0.1))
while Ben left out the important (1+rnorm( )    ) in his version using sweep.
(d) Details: I still have difficulty in getting meaningfully non-0  random effects for the
slopes "a" ... Again, this could be my bad coding or it could reflect the
distributions of the y variables as they are normalized. 

Thanks much from this newbie, ... fixed effects models have
solved that "there ought to be a way" quandary for me.

Bob Chatfield
On Jan 25, 2014, at 11:45 AM, Ben Bolker <bbolker at gmail.com> wrote: