- using R version 2.14.0 (2011-10-31)
- using platform: i386-apple-darwin9.8.0 (32-bit)
- using session charset: ASCII
- checking for file 'lmm/DESCRIPTION' ... OK
- this is package 'lmm' version '0.3-5'
- checking package namespace information ... OK
- checking package dependencies ... OK
- checking if this is a source package ... OK
- checking if there is a namespace ... OK
- checking for executable files ... OK
- checking whether package 'lmm' can be installed ... OK
- checking installed package size ... OK
- checking package directory ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking index information ... OK
- checking package subdirectories ... OK
- checking R files for non-ASCII characters ... OK
- checking R files for syntax errors ... OK
- loading checks for arch 'i386'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
- loading checks for arch 'x86_64'
** checking whether the package can be loaded ... OK
** checking whether the package can be loaded with stated dependencies ... OK
** checking whether the package can be unloaded cleanly ... OK
** checking whether the namespace can be loaded with stated dependencies ... OK
** checking whether the namespace can be unloaded cleanly ... OK
- checking for unstated dependencies in R code ... OK
- checking S3 generic/method consistency ... OK
- checking replacement functions ... OK
- checking foreign function calls ... OK
- checking R code for possible problems ... OK
- checking Rd files ... OK
- checking Rd metadata ... OK
- checking Rd cross-references ... OK
- checking for missing documentation entries ... OK
- checking for code/documentation mismatches ... OK
- checking Rd \usage sections ... OK
- checking Rd contents ... OK
- checking for unstated dependencies in examples ... OK
- checking line endings in C/C++/Fortran sources/headers ... OK
- checking line endings in Makefiles ... OK
- checking for portable use of $(BLAS_LIBS) and $(LAPACK_LIBS) ... OK
- checking compiled code ... OK
- checking sizes of PDF files under 'inst/doc' ... OK
- checking examples ...
** running examples for arch 'i386' ... OK
** running examples for arch 'x86_64' ... ERROR
Running examples in 'lmm-Ex.R' failed
The error most likely occurred in:
> ### Name: example.lmm
> ### Title: lmm library example command file
> ### Aliases: example.lmm
> ### Keywords: models
>
> ### ** Examples
>
> #
> # -----------------------------------------------------------------
> # 15 minutes 90 minutes
> # ---------------------- ----------------------
> # Placebo Low High Placebo Low High
> # -----------------------------------------------------------------
> # Subject 1 16 20 16 20 -6 -4
> # 2 12 24 12 -6 4 -8
> # 3 8 8 26 -4 4 8
> # 4 20 8 NA NA 20 -4
> # 5 8 4 -8 NA 22 -8
> # 6 10 20 28 -20 -4 -4
> # 7 4 28 24 12 8 18
> # 8 -8 20 24 -3 8 -24
> # 9 NA 20 24 8 12 NA
> # -----------------------------------------------------------------
> #
> ########################################################################
> # Below we show how to fit a traditional compound symmetry model
> # with a fixed effect for each column (occasion) and a random
> # intercept for each subject. First we enter the data.
> #
> y <- c(16,20,16,20,-6,-4,
+ 12,24,12,-6,4,-8,
+ 8,8,26,-4,4,8,
+ 20,8,20,-4,
+ 8,4,-8,22,-8,
+ 10,20,28,-20,-4,-4,
+ 4,28,24,12,8,18,
+ -8,20,24,-3,8,-24,
+ 20,24,8,12)
> occ <- c(1,2,3,4,5,6,
+ 1,2,3,4,5,6,
+ 1,2,3,4,5,6,
+ 1,2,5,6,
+ 1,2,3,5,6,
+ 1,2,3,4,5,6,
+ 1,2,3,4,5,6,
+ 1,2,3,4,5,6,
+ 2,3,4,5)
> subj <- c(1,1,1,1,1,1,
+ 2,2,2,2,2,2,
+ 3,3,3,3,3,3,
+ 4,4,4,4,
+ 5,5,5,5,5,
+ 6,6,6,6,6,6,
+ 7,7,7,7,7,7,
+ 8,8,8,8,8,8,
+ 9,9,9,9)
> ########################################################################
> # Now we must specify the model.
> # If the six measurements per subject were ordered in time, we might
> # consider using a model with time of measurement entered with linear
> # (or perhaps higher-order polynomial) effects. But because the
> # six measurements are not clearly ordered, let's use a model that has
> # an intercept and five dummy codes to allow the population means for
> # the six occasions to be estimated freely. We will also allow the
> # intercept to randomly vary by subject. For a subject i with no
> # missing values, the covariate matrices will be
> #
> # 1 1 0 0 0 0 1
> # 1 0 1 0 0 0 1
> # Xi = 1 0 0 1 0 0 Zi = 1
> # 1 0 0 0 1 0 1
> # 1 0 0 0 0 1 1
> # 1 0 0 0 0 0 1
> #
> # The Xi's and Zi's are combined into a single matrix called
> # pred. The pred matrix has length(y) rows. Each column of Xi and Zi
> # must be represented in pred. Because Zi is merely the first column
> # of Xi, we do not need to enter that column twice. So pred is simply
> # the matrices Xi (i=1,...,9), stacked upon each other.
> #
> pred <- cbind(int=rep(1,49),dummy1=1*(occ==1),dummy2=1*(occ==2),
+ dummy3=1*(occ==3),dummy4=1*(occ==4),dummy5=1*(occ==5))
> xcol <- 1:6
> zcol <- 1
> ########################################################################
> # Now find ML estimates using the ECME procedure and the faster
> # scoring algorithm
> #
> ecmeml.result <- ecmeml.lmm(y,subj,pred,xcol,zcol)
Performing ECME...
Warning in ecmeml.lmm(y, subj, pred, xcol, zcol) :
Supplied V <- i matrix is not positive definite
> fastml.result <- fastml.lmm(y,subj,pred,xcol,zcol)
Performing FAST-ML...
Warning in fastml.lmm(y, subj, pred, xcol, zcol) :
Supplied V <- i matrix is not positive definite
Warning in fastml.lmm(y, subj, pred, xcol, zcol) :
did not converge by 0 iterations
> #
> # In this example, ECME converged in 212 cycles, but the fast
> # algorithm took only 8. The results can be viewed by printing the
> # various components of "ecmeml.result" and "fastml.result".
> # For example, extract the ML estimate of the fixed effects beta.
> #
> beta.hat <- fastml.result$beta
> #
> # Because of the dummy codes used in the Xi's, the first element of
> # beta (the intercept) estimates the mean for the last occasion,
> # and the other elements of beta estimate the differences in means
> # between the first five occasions and the last one. So we can find
> # the estimated means for the six occasions like this:
> #
> muhat <- c(beta.hat[2]+beta.hat[1], beta.hat[3]+beta.hat[1],
+ beta.hat[4]+beta.hat[1], beta.hat[5]+beta.hat[1],
+ beta.hat[6]+beta.hat[1], beta.hat[1])
> #
> # The functions for RML estimation work exactly the same way:
> #
> ecmerml.result <- ecmerml.lmm(y,subj,pred,xcol,zcol)
Performing ECME for RML estimation...
Warning in ecmerml.lmm(y, subj, pred, xcol, zcol) :
Supplied V <- i matrix is not positive definite
> fastrml.result <- fastrml.lmm(y,subj,pred,xcol,zcol)
Performing FAST-RML...
Warning in fastrml.lmm(y, subj, pred, xcol, zcol) :
Supplied V <- i matrix is not positive definite
Warning in fastrml.lmm(y, subj, pred, xcol, zcol) :
did not converge by 0 iterations
Warning in fastrml.lmm(y, subj, pred, xcol, zcol) :
loglikelihood not concave at solution
> #
> #######################################################################
> # The function "fastrml.lmm" calculates the improved variance
> # estimates for random effects described in Section 4 of Schafer
> # (1998). The code below reproduces Table 2, which compares
> # 95% interval estimates under the new method to conventional
> # empirical Bayes intervals.
> #
> b.hat <- as.vector(fastrml.result$b.hat)
> se.new <- sqrt(as.vector(fastrml.result$cov.b.new))
Error in sqrt(as.vector(fastrml.result$cov.b.new)) :
Non-numeric argument to mathematical function
Execution halted
- elapsed time (check, wall clock): 0:42