Skip to content

Commit 23fec45

Browse files
author
Steve Walker
committed
small
1 parent f7ee2ed commit 23fec45

File tree

2 files changed

+6
-4
lines changed

2 files changed

+6
-4
lines changed

R/pls.R

+1
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ lmerCorr.fit <- function(y, mmFE, corr, grp,
103103

104104
}
105105

106+
106107
##' Create linear mixed model deviance function
107108
##'
108109
##' A pure \code{R} implementation of the

R/templateApproach.R

+5-4
Original file line numberDiff line numberDiff line change
@@ -135,19 +135,20 @@ mkRanefStructuresCorr <- function(corr, grp, n){
135135
# create Zt
136136
Zt <- KhatriRao(Jt, t(rep(1,n)))
137137

138+
# create Lambdat
138139
Lambdat <- as(t(chol(corr)), Class="sparseMatrix")
139-
# Lambdat <- Cholesky(as(Matrix(corr), Class="sparseMatrix"))
140140

141+
# create mapping from theta to
142+
# the non-zero components of
143+
# Lambdat
141144
thfun <- local({
142145
template <- Lambdat
143146
function(theta) theta * template@x})
144-
147+
145148
list( Zt = Zt,
146149
Lambdat = Lambdat,
147150
thfun = thfun,
148151
theta = 1,
149152
lower = 0, # lower and
150153
upper = Inf) # upper bounds on theta parameters
151-
152-
153154
}

0 commit comments

Comments
 (0)