[R-sig-ME] starting values in nlme

Jesus Frias Jesus.Frias at dit.ie
Fri May 7 13:47:08 CEST 2010


Hi Paul,

If the model failed to converge without the Vents effect you may want to
try:

Press.fit1 <-nlme(model = Pressure ~ Peak * (1 - exp(-Rate*Time)), fixed =
list(Peak~1, Rate ~ Vents), random = Peak + Rate ~ 1 | Sample, data =
Press.dat, start = c(2,1.3,2.6))

The 1.3 is the difference in rate between the first level of your factor
Vents and the second (analytical contrasts). Use a better estimation of that
value instead of the 1.3 (double the rate for using 2 vents, if 1 Vent is
the first level in your Vents variable).

Regards,

Jesus


-----Original Message-----
From: Prew, Paul [mailto:Paul.Prew at ecolab.com] 
Sent: Thursday, May 06, 2010 9:55 PM
To: Jesus Frias
Cc: r-sig-mixed-models at r-project.org
Subject: RE: [R-sig-ME] starting values in nlme

Dear Jesus,

Thank you for your reply.  Your suggested changes did work, but the model
failed to converge as you ventured might happen.  In reading through various
sources and  help lists, could be that the model is over-parameterized, and
random effects for the repeated measures are over-kill.

Also, your reply was helpful in identifying the complex interpretation of my
model terms.  I am interested in modeling the Rate as a function of # Vents.
Probably not the Asymptote/Peak vs. # Vents, after thinking about it more.
The other 'flexibility' in the parameters --- the Time interaction --- was
me not understanding the concepts of nonlinear mixed models.   Thank you for
your insight.

Regards,
Paul


Paul Prew  |  Statistician
651-795-5942   |   fax 651-204-7504 
Ecolab Research Center  | Mail Stop ESC-F4412-A 
655 Lone Oak Drive  |  Eagan, MN 55121-1560 

 

-----Original Message-----
From: Jesus Frias [mailto:Jesus.Frias at dit.ie] 
Sent: Thursday, May 06, 2010 8:14 AM
To: Prew, Paul
Cc: r-sig-mixed-models at r-project.org
Subject: RE: [R-sig-ME] starting values in nlme

Hi Paul,

I think that in your "fixed=" statement you are declaring 
linear relationships between your parameters (Peak and Rate) 
and the variables Vents and Time.
 
fixed = Peak + Rate ~ Vents * Time

you are saying that the Peak pressure and the rate of decrease  
depends on the no of Vents and changes linearly with time. 

If I understand well what you are doing you probably want 

fixed= Peak + Rate ~ 1

That will work with the starting values that you have (and if 
you are lucky it will converge). 

After you have obtained that model you can start building more 
complicated relationships (specially introducing Vents, to 
check for differences between using 1 Vent or 2 Vents). I am 
not sure about the time relationship in that mass transfer.

Regards,

Jesus


Jesús María Frías Celayeta
Head of Department of Food Science
School of Food Science and Environmental Health Dublin 
Institute of Technology t +353 1 402 4459 f +353 1 4024495 w 
http://fseh.dit.ie/o4/StaffListing/JesusFrias.html





-----Original Message-----
From: r-sig-mixed-models-bounces at r-project.org
[mailto:r-sig-mixed-models-bounces at r-project.org] On Behalf Of 
Prew, Paul
Sent: Thursday, May 06, 2010 7:13 AM
To: r-sig-mixed-models at r-project.org
Subject: [R-sig-ME] starting values in nlme

Hello,  I am making my first attempt to work with a non-linear 
model in R, and am hoping someone can spot the error I've made. 
 The scenario is to
model the rate of gas escaping from a container with 1 vs. 2 vents.   10
container samples were pumped up to 2 psi (relative pressure), 
then allowed to vent for 15 minutes.  Pressure readings were 
taken every minute.  The research question is the significance 
of the Vent factor (1 vs. 2),  with Samples as the random 
factor and Pressure decaying exponentially.  Readings at time 
zero were removed, as they were 2 psi.  Any direction you can 
provide is appreciated, regards, Paul
 
> str(Press.dat)
'data.frame':   125 obs. of  4 variables:
 $ Time     : num  1 2 3 4 5 6 7 8 9 10 ...
 $ Pressure : num  1.8 1.6 1.5 1.4 1.3 1.2 1.1 1 0.9 0.8 ...
 $ Vents    : num  1 1 1 1 1 1 1 1 1 1 ...
 $ Sample   : num  1 1 1 1 1 1 1 1 1 1 ...
 

 
> Press.fit1 <-
+ nlme(model = Pressure ~ Peak * (1 - exp(-Rate*Time)), fixed = Peak + 
+ Rate ~ Vents * Time, random = Peak + Rate ~ 1 | Sample, data = 
+ Press.dat, start = c(Peak=2, Rate=1.3))
Error in nlme.formula(model = Pressure ~ Peak * (1 - exp(-Rate 
* Time)),  : 
  starting values for the fixed component are not the correct length
 

CONFIDENTIALITY NOTICE: \ This e-mail communication an.....{{dropped:26}}




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