SCM

SCM Repository

[matrix] Diff of /branches/trunk-lme4/R/ssclme.R
ViewVC logotype

Diff of /branches/trunk-lme4/R/ssclme.R

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

revision 45, Mon Apr 5 01:06:55 2004 UTC revision 46, Mon Apr 5 01:08:02 2004 UTC
# Line 66  Line 66 
66                   }                   }
67                   return(x)                   return(x)
68               })               })
69    
70    setMethod("deviance", signature(object = "ssclme"),
71              function(object, REML = FALSE, ...) {
72                  .Call("ssclme_factor", object, PACKAGE = "Matrix")
73                  object@deviance[ifelse(REML, 2, 1)]
74              })
75    
76    setMethod("coef", signature(object = "ssclme"),
77              function(object, ...) {
78                  .Call("ssclme_coef", object, PACKAGE = "Matrix")
79              })
80    
81    setMethod("ranef", signature(object = "ssclme"),
82              function(object, ...) {
83                  val = .Call("ssclme_ranef", object, PACKAGE = "Matrix")
84                  bv = object@bVar
85                  names(val) = names(bv)
86                  for (i in seq(along = val)) {
87                      dimnames(val[[i]]) = dimnames(bv[[i]])[-1]
88                  }
89                  lapply(val, t)
90              })
91    
92    
93    setMethod("fixef", signature(object = "ssclme"),
94              function(object, ...) {
95                  val = .Call("ssclme_fixef", object, PACKAGE = "Matrix")
96                  names(val) = dimnames(object@XtX)[[2]][seq(along = val)]
97                  val
98              })
99    
100    setMethod("vcov", signature(object = "ssclme"),
101              function(object, ...) {
102                  sigma = .Call("ssclme_sigma", object, PACKAGE = "Matrix")
103                  rr = object@RXX
104                  nr = nrow(rr)
105                  rr = rr[-nr, -nr, drop = FALSE]
106                  sigma^2 * rr %*% t(rr)
107              })
108    

Legend:
Removed from v.45  
changed lines
  Added in v.46

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