Doug wrote:
> I think a simpler solution, which I have implemented in lme4 but not
> yet released is to have
> importFrom(nlme, ranef, fixef)
> in the NAMESPACE file of packages that implement methods for those
> generics (and, of course, add nlme to the Imports: specification in
> the DESCRIPTIO
I think a simpler solution, which I have implemented in lme4 but not
yet released is to have
importFrom(nlme, ranef, fixef)
in the NAMESPACE file of packages that implement methods for those
generics (and, of course, add nlme to the Imports: specification in
the DESCRIPTION file). As nlme is a r
Wouldn't it make sense to simply create a "ranef" package whose only
role in the universe is to create the generic function that lme4, coxme,
and anyone else who needs it could just import, without getting tons of
additional and (depending on the application) irrelevant code?
Best,
Kevin
U
On 08.03.2010 17:16, Terry Therneau wrote:
Brian& Uwe,
Thanks for responding. Let me see if I can refine the query and move
towards a solution.
From Uwe:
Of course, after loading lme4, you can still use the ranef from coxme:
coxme::ranef(fit)
Of course, but I'm interested in other user
Brian & Uwe,
Thanks for responding. Let me see if I can refine the query and move
towards a solution.
>From Uwe:
> Of course, after loading lme4, you can still use the ranef from coxme:
> coxme::ranef(fit)
Of course, but I'm interested in other users (as well as myself) and
prefer to avoid th
On Sat, 6 Mar 2010, Uwe Ligges wrote:
Terry,
this happens since the ranef in coxme is a S3 generic and the one in lme4 is
a S4 generic.
But the packages could be more cooperative. There is also a S3
generic for ranef in package nlme. Ideally the S4 generic in lme4
would have a default me
Terry,
this happens since the ranef in coxme is a S3 generic and the one in
lme4 is a S4 generic.
Of course, after loading lme4, you can still use the ranef from coxme:
coxme::ranef(fit)
and get the desired result.
If you write your own code, you might want to use that call explicitly
(i.e
Sorry for one more email, but here is a more concise and pertinent "ranef"
example:
# Allow S4 methods to find S3 asreml objects
setOldClass("asreml")
if(!isGeneric("ranef")){
setGeneric("ranef", function(object, ...) standardGeneric("ranef"))
}
ranef.asreml <- function(obj){
effects <- obj$
The coxme package has a ranef() method, as does lme4. I'm having
trouble getting them to play together, as shown below. (The particular
model in the example isn't defensible, but uses a standard data set.)
The problem is that most of the time only one of lme4 or coxme will be
loaded, so each nee