From ripley at stats.ox.ac.uk  Thu Mar 20 07:38:33 2003
From: ripley at stats.ox.ac.uk (ripley@stats.ox.ac.uk)
Date: Thu Mar 20 08:38:47 2003
Subject: [Rd] stepAIC() (PR#2655)
In-Reply-To: <200303191047.h2JAlFn9025312@pubhealth.ku.dk>
Message-ID: <Pine.LNX.4.44.0303200736550.16595-100000@gannet.stats>

This is already fixed in the current stepAIC for R-devel, to be releases 
with R 1.7.0.

On Wed, 19 Mar 2003 slteng@stat.berkeley.edu wrote:

> Full_Name: Melinda Teng
> Version: 1.6.2
> OS: windows M E
> Submission from: (NULL) (136.152.196.249)
> 
> 
> Greatly appreciate for any advice on the following. Many grateful thanks. Please
> do not hesitate to contact me for further details.
> -------------------------------------------------------------------
> 
> Error message :
> "Error in model.frame.default(formula = Y ~ X4, data = TS, drop.unused.levels =
> TRUE) : Object "TS" not found"
> 
> Actions taken :
> debug(), traceback(), and looking into model.frame.default.
> 
> Situation : 
> stepAIC() is used to select variables into a regression model by forward
> selection procedure. This stepAIC() is programmed within a function where the
> data.frame of the required data are defined and computed.
> 
> Problem : When I cut and paste the body of the function Q and run in the
> workspace, it will give me the required output and the data.frame from gfit (T)
> is passed into stepAIC() for the selection procedure. However when I execute the
> same codes, but now through the function (Q(), see below), the above error
> message appears.

[...]



-- 
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


[Rd] stepAIC() (PR#2655)
ripley@stats.ox.ac.uk