Sarah Holte
2005-Mar-10 19:28 UTC
[R] how to view the syntax of a method which is not a generic method
Hello - I'm trying to modify an option for the lme() or nlme() macros. I want to write my own specification for the variance function and am following homework problem 4, Chapter 5, page 268 of Pinheiro and Bates book on mixed effect. I'm up to point where I've created a new class using an existing variance function class, varExp as a template. Next I need to write an initialize method. The book suggests that I use the inialize method for one of the exisiting variance functions for lme(), eg varExp. What I want is the syntax of the initialize.varExp method so that I can edit it to create an initialize method for my newly constructed class. So - I tried to get the text of this method, called initialize.varExp by using the showMethods command. Here's what happened. > showMethods("initialize.varExp") Function "initialize.varExp": <not a generic function> So I assume that inialize.varExp is not a generic method. I also have the following information. > findFunction("initialize.varExp") list() and > findFunction("varExp") [[1]] <environment: package:nlme> attr(,"name") [1] "package:nlme" attr(,"path") [1] "C:/PROGRA~1/R/rw1091/library/nlme" So I'm guessing I somehow need to tell the showMethods command that initialize.varExp is part of the nlme package. And now I'm stuck - any suggestions? Thanks so much - Sarah Holte
Seth Falcon
2005-Mar-10 20:18 UTC
[R] how to view the syntax of a method which is not a generic method
Hi Sarah, Sarah Holte <Sholte at fhcrc.org> writes:> The book suggests that I use the inialize method for one of the > exisiting variance functions for lme(), eg varExp. What I want is > the syntax of the initialize.varExp method so that I can edit it to > create an initialize method for my newly constructed class.You might want to download the source package for nlme. You can get it here: http://cran.fhcrc.org/src/contrib/nlme_3.1-56.tar.gz I think the function you are looking for is defined in varFunc.R and it looks like it is Initialize.varExp (initial cap) so you might retry your search techniques with that name. Hope that helps, + seth
Possibly Parallel Threads
- creating new varFunc classes in nlme .. error: "Don't know how to get coefficients for .. object"
- Dealing with heterogeneity with varComb weights
- dealing with heteroscedasticity in lmer: problem with the method weights
- question regarding variance function in gls
- varComb in gls/lme