From gregory_r_warnes at groton.pfizer.com  Wed Nov  5 15:55:13 2003
From: gregory_r_warnes at groton.pfizer.com (Warnes, Gregory R)
Date: Wed Nov  5 15:54:18 2003
Subject: [Rd] NLME: gls parameter evaluation inconsistency (PR#4757)
Message-ID: <D7A3CFD7825BD6119B880002A58F06C20680AA18@groexmb02.pfizer.com>




> -----Original Message-----
> From: Douglas Bates [mailto:bates@stat.wisc.edu]
> Sent: Friday, October 24, 2003 12:16 PM
[...]
> Yes.  It's the old "standard non-standard evaluation" problem.  The
> model.frame function is (and has to be) very peculiar in the way
> that it determines the value of variable names without local
> bindings.  That's the non-standard evaluation part.  Because it is
> difficult to get this right, it helps if it only needs to be done in
> one place so we have what Thomas Lumley described as a "standard
> non-standard evaluation" function in the current model.frame function.
> 
> However, model.frame expects to have only one argument called
> "formula" (the first argument) containing a formula that will need to
> be evaluated in the frame.  The model fitting functions in the nlme
> package can have formulas in multiple arguments.  Arranging for the
> proper call to model.frame to be evaluated is not easy.
> 
> A workaround is to use subset on the data frame passed as an argument
> 
> prgls <- function(name){ gls( log10(Y)~(cond-1)+(cond-1):t
>  ,subset(pr,subject==name))}

Why don't we extend model.frame to allow for multiple 'formula-like'
arguments?  Perhaps by adding an argument that allows the call to specify
which paramters are 'formula-like'?

-G


LEGAL NOTICE\ Unless expressly stated otherwise, this messag...{{dropped}}


[Rd] NLME: gls parameter evaluation inconsistency (PR#4757)
Warnes, Gregory R