SCM

SCM Repository

[matrix] Diff of /pkg/R/lmer.R
ViewVC logotype

Diff of /pkg/R/lmer.R

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 823, Sat Jul 30 21:35:38 2005 UTC revision 824, Sat Aug 6 20:01:51 2005 UTC
# Line 57  Line 57 
57      term      term
58  }  }
59    
60    abbrvNms <- function(gnm, cnms)
61    {
62        ans <- paste(abbreviate(gnm), abbreviate(cnms), sep = '.')
63        if (length(cnms) > 1) {
64            anms <- lapply(cnms, abbreviate, minlength = 3)
65            nmmat <- outer(anms, anms, paste, sep = '.')
66            ans <- c(ans, paste(abbreviate(gnm, minlength = 3),
67                                nmmat[upper.tri(nmmat)], sep = '.'))
68        }
69        ans
70    }
71    
72  ## Control parameters for lmer  ## Control parameters for lmer
73  lmerControl <-  lmerControl <-
74    function(maxIter = 200,    function(maxIter = 200,
# Line 811  Line 823 
823        })        })
824    
825  setMethod("mcmcsamp", signature(obj = "lmer"),  setMethod("mcmcsamp", signature(obj = "lmer"),
826            function(obj, nsamp = 1, verbose = FALSE, saveb = FALSE, ...)            function(obj, nsamp = 1, verbose = FALSE, saveb = FALSE,
827                       trans = TRUE, ...)
828        {        {
829            if (obj@family$family == "gaussian" &&            if (obj@family$family == "gaussian" &&
830                obj@family$link == "identity") {                obj@family$link == "identity") {
831                ans <- .Call("lmer_MCMCsamp", obj, saveb, nsamp,                ans <- .Call("lmer_MCMCsamp", obj, saveb, nsamp, trans,
832                              PACKAGE = "Matrix")                              PACKAGE = "Matrix")
833            } else {            } else {
834                ## Check arguments                ## Check arguments
# Line 871  Line 884 
884                             PACKAGE = "Matrix")                             PACKAGE = "Matrix")
885                .Call("glmer_finalize", GSpt, PACKAGE = "Matrix");                .Call("glmer_finalize", GSpt, PACKAGE = "Matrix");
886            }            }
887            cn <- as.character(seq(len = ncol(ans)))            gnms <- names(obj@flist)
888            fxd <- fixef(obj)            cnms <- obj@cnames
889            cn[seq(along = fxd)] <- names(fxd)            colnames(ans) <- c(names(fixef(obj)), "sigma^2",
890            cn[length(fxd) + 1] <- "sigma^2"                               unlist(lapply(seq(along = gnms),
891            colnames(ans) <- cn                                             function(i)
892                                               abbrvNms(gnms[i],cnms[[i]]))))
893            ans            ans
894        })        })
895    

Legend:
Removed from v.823  
changed lines
  Added in v.824

root@r-forge.r-project.org
ViewVC Help
Powered by ViewVC 1.0.0  
Thanks to:
Vienna University of Economics and Business Powered By FusionForge