[R-sig-ME] starting values in nlme

Jesus Frias Jesus.Frias at dit.ie
Thu May 6 15:14:11 CEST 2010


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:9}}




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