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 800, Tue Jul 5 00:38:09 2005 UTC revision 801, Wed Jul 6 16:24:33 2005 UTC
# Line 204  Line 204 
204                              ))                              ))
205            devAGQ <- function(pars, n)            devAGQ <- function(pars, n)
206                .Call("glmer_devAGQ", pars, GSpt, n, PACKAGE = "Matrix")                .Call("glmer_devAGQ", pars, GSpt, n, PACKAGE = "Matrix")
           ## FIXME:  Change this to start at 11 and decrease.  The  
           ## evaluation at the PQL estimates is done once only.  
207    
208            deviance <- devAGQ(PQLpars, 1) # Laplacian approximation            deviance <- devAGQ(PQLpars, 1)
209    ### FIXME: Change this to an AGQ evaluation once when nf == 1.  Needs
210    ### AGQ for nc > 1 first.
211            fxd <- PQLpars[fixInd]            fxd <- PQLpars[fixInd]
212            loglik <- logLik(mer)            loglik <- logLik(mer)
213    
# Line 250  Line 250 
250                    cat(paste("convergence message", optimRes$message, "\n"))                    cat(paste("convergence message", optimRes$message, "\n"))
251                }                }
252                fxd[] <- optpars[fixInd]  ## preserve the names                fxd[] <- optpars[fixInd]  ## preserve the names
253                  .Call("lmer_coefGets", mer, optpars[-fixInd], 2,
254                        PACKAGE = "Matrix")
255            }            }
256    
257            .Call("glmer_finalize", GSpt, PACKAGE = "Matrix")            .Call("glmer_finalize", GSpt, PACKAGE = "Matrix")
# Line 863  Line 865 
865                  varc = matrix(0, nr = length(varc), nc = nsamp))                  varc = matrix(0, nr = length(varc), nc = nsamp))
866      for (i in 1:nsamp) {      for (i in 1:nsamp) {
867          ## conditional means and variances of fixed effects          ## conditional means and variances of fixed effects
868          fixed <- .Call("glmer_fixed_update", GSpt, b, fixed, PACKAGE = "Matrix")          fupd <- .Call("glmer_fixed_update", GSpt, b, fixed, PACKAGE = "Matrix")
869          ans$fixed[,i] <- fixed          ans$fixed[,i] <- fixed <- fupd$fixed
870          ## sample from the conditional distribution of beta given b and y          ## sample from the conditional distribution of beta given b and y
871          ## conditional means and variances of random_effects          ## conditional means and variances of random_effects
872          .Call("glmer_bhat", GSpt, fixed, varc, PACKAGE = "Matrix")          .Call("glmer_bhat", GSpt, fixed, varc, PACKAGE = "Matrix")

Legend:
Removed from v.800  
changed lines
  Added in v.801

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