[R-sig-ME] Formula and Start-values Any help at all?… Yes!

Robert Chatfield chatfield at alumni.rice.edu
Mon Jan 27 00:09:34 CET 2014


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:

> Robert Chatfield <chatfield at ...> writes:
> 
>> Dear list, I still have no idea how to specify or give start values
>> for vectors in a formula for nlmer() The technique works fine for an
>> approximate method I use in lmer() (That technique depends heavily
>> on some scaling of variables.)  Here is a self-contained example
>> using some mock data whose origin is described.
> 
>  I don't know if I got sensible answers or not, but I seem to have
> succeeded in fitting a model.  The key changes were: (1) starting
> parameters are *single* values (these are starting values for the
> mean/central values of the parameters, not of the random effects);
> (2) leaving "xlong" out of namevec in the deriv() call, because it's
> a predictor variable, not a parameter (you don't want its gradient)
> 



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