s-news
[Top] [All Lists]

problems with gam models

To: s-news@wubios.wustl.edu
Subject: problems with gam models
From: lieven clement <lieven.clement@biomath.rug.ac.be>
Date: Tue, 27 Mar 2001 15:36:39 +0200
Hi,

I 've got a few annoying problems with S-plus. When I try to run a
function similar to this:
function(new.data,...)
{    dataset <- ...
      gam.obj<-gam(O2~lo(NO2)+lo(Temp)+lo(Day),data=dataset)
      predict(gam.obj,new.data)
}

The predict function doesn't find the local variable dataset. In order
to run this function, I have to attach the variable dataset or I have to
difine dataset as a global variable outside the function.

Secondly I have some severe memory-problems. I have to repeat the
bootstrap on many gam objects, I have to use a for loop because I can't
fit the bootstrap procedure in an lapply. (bootstrap function itself
consists of an lapply in a for loop)
Up to know I have to run a script in batch mode en perform the loop in
Dos

Greetings,

Lieven
--
 _________________________________________________________________

  ir. Lieven Clement
  BIOMATH
  Department Applied Mathematics, Biometrics and Process Control
  Ghent University, Coupure Links 653, B-9000 GENT, Belgium

  Tel.: +32 9 264.59.33
  Fax.: +32 9 223.62.20
  e-mail: lieven.clement@biomath.rug.ac.be
 _________________________________________________________________



<Prev in Thread] Current Thread [Next in Thread>
  • problems with gam models, lieven clement <=