[R-sig-ME] Random Effects in NLME

Dan ieshan at gmail.com
Fri Apr 20 15:48:43 CEST 2018


Hi all:

I am struggling with the proper way to code random effects for an
experiment in which temperature (cooling) was measured across time. I
cannot share the data. However, I will describe the experiment: The cooling
of an object is measured six times over the course of a minute from a fixed
temperature on down. Then, each object (there are 30 objects) is coated
with one (and only one) of three materials.

Multiple replicates are completed for both the before-coating and
after-coating conditions.

So, each object (say, A) has multiple runs in the 'Control' condition
(e.g., A1C,A2C,A3C) and with Coating X (e.g., A1X, A2X, A3X). A second
object (say, B) has multiple runs in the 'Control' condition (B1C, B2C,
B3C) and with Coating Y (B1Y, B2Y, B3Y), etc. As I mentioned, there are
multiple measurements within each run; these measurements fit a cooling
function (exponential decay).

I am able to create a nonlinear model, e.g :
nlme(Temperature~(a-c)*exp(b*Time)+c,
           fixed=list(a~Coating,b~Coating,c~Coating),
           random=a+b+c~1|Object,
           start=startVec)

Which fits. And returns lots of "significant" differences in parameter
estimates.

However, I am somewhat distrustful of these results, as if this was a
linear mixed model, I would have expected a random effects structure more
like (lmer) (Coating| Object ) OR (1| Object ) + (1|Tooth:Coating).

However, when I change:
           random=a+b+c~1|Object
to
           random=a+b+c~Coating| Object

R simply locks up. I assume this is because I'm now estimating way too many
Random Effects.

But, I can't figure out how to specify something like
            random=a~Object, b~Coating|Object, c~Object,
or something similar.

I've done quite a lot of Googling about this, but have struggled to find
nlme examples. Ben in particular has a page was helpful (
http://rpubs.com/bbolker/3423), but as best I can tell, that example uses
something similar to first equation above and doesn't allow varying
parameters by group.

Also note that the models above don't use the individual 'Run' information,
and I suppose that they could (Tooth/Run?).

Any thoughts on the correct model specification here?

Best-
Dan

	[[alternative HTML version deleted]]



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