s-news
[Top] [All Lists]

Re: Thanks

To: ad@cs.uu.nl
Subject: Re: Thanks
From: Prof Brian Ripley <ripley@stats.ox.ac.uk>
Date: Mon, 16 Jan 2006 08:38:07 +0000 (GMT)
Cc: s-news@wubios.wustl.edu
In-reply-to: <10045.80.60.20.207.1137327448.squirrel@mail.cs.uu.nl>
References: <10045.80.60.20.207.1137327448.squirrel@mail.cs.uu.nl>
On Sun, 15 Jan 2006 ad@cs.uu.nl wrote:

Dear S users,

Thanks to everyone who responded to my question (reproduced at
the end of this message). As it turns out it was not a problem
with stepAIC, but with my understanding of the S scoping rules.
Two solutions were suggested to me, both of which solved the
problem. The first is to assign "data" to frame 1, using
assign("data",data,frame=1). The other solution also works but
I don't know why: change the call to glm to
fit <- do.call("glm", list(fo = y ~ ., data = data, family = binomial))

That embeds the (deparsed) actual data in the call component of the object 'fit'. The deparse/parse steps could involve subtle changes due to representation errors, and it is certainly slow for large datasets.

--
Brian D. Ripley,                  ripley@stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595

<Prev in Thread] Current Thread [Next in Thread>
  • Thanks, ad
    • Re: Thanks, Prof Brian Ripley <=