- using R version 4.3.3 (2024-02-29)
- using platform: aarch64-apple-darwin20 (64-bit)
- R was compiled by
Apple clang version 14.0.0 (clang-1400.0.29.202)
GNU Fortran (GCC) 12.2.0
- running under: macOS Ventura 13.4
- using session charset: UTF-8
- checking for file ‘gammi/DESCRIPTION’ ... OK
- checking extension type ... Package
- this is package ‘gammi’ version ‘0.1’
- package encoding: UTF-8
- 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 for hidden files and directories ... OK
- checking for portable file names ... OK
- checking for sufficient/correct file permissions ... OK
- checking whether package ‘gammi’ can be installed ... [4s/5s] OK
See the install log for details.
- checking installed package size ... OK
- checking package directory ... OK
- checking DESCRIPTION meta-information ... OK
- checking top-level files ... OK
- checking for left-over 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
- checking whether the package can be loaded ... [1s/1s] OK
- checking whether the package can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the package can be unloaded cleanly ... [1s/1s] OK
- checking whether the namespace can be loaded with stated dependencies ... [1s/1s] OK
- checking whether the namespace can be unloaded cleanly ... [1s/1s] OK
- checking loading without being on the library search path ... [1s/1s] OK
- checking startup messages can be suppressed ... [1s/1s] OK
- checking 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 ... [3s/4s] OK
- checking Rd files ... [0s/0s] 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 contents of ‘data’ directory ... OK
- checking data for non-ASCII characters ... [0s/0s] OK
- checking data for ASCII and uncompressed saves ... OK
- checking examples ... [1s/1s] ERROR
Running examples in ‘gammi-Ex.R’ failed
The error most likely occurred in:
> ### Name: exam
> ### Title: Cross-Classified Examination Data
> ### Aliases: exam
> ### Keywords: datasets
>
> ### ** Examples
>
> # load 'exam' help file
> ?exam
exam package:gammi R Documentation
_ C_ r_ o_ s_ s-_ C_ l_ a_ s_ s_ i_ f_ i_ e_ d _ E_ x_ a_ m_ i_ n_ a_ t_ i_ o_ n _ D_ a_ t_ a
_ D_ e_ s_ c_ r_ i_ p_ t_ i_ o_ n:
Scores on secondary school leaving examinations (response) and
verbal reasoning scores in primary school (fixed effect) for 3435
students in Fife, Scotland. The students are cross-classified in
148 primary schools (random effect) and 19 secondary schools
(random effect).
_ U_ s_ a_ g_ e:
data("exam")
_ F_ o_ r_ m_ a_ t:
A data frame with 3435 observations on the following 4 variables.
‘VRQ.score’ Verbal Reasoning Quotient obtained in primary school
(integer vector ranging from 70 to 140)
‘Exam.score’ Leaving examination score obtained in secondary
school (integer vector ranging from 1 to 10)
‘Primary.school’ Primary school identifier (factor with 148
levels)
‘Secondary.school’ Secondary school identifier (factor with 19
levels)
_ D_ e_ t_ a_ i_ l_ s:
The VRQ scores were obtained at age 12 (right before entering
secondary school), and the Exam scores were obtained at age 16
(right before leaving secondary school). The VRQ scores are
constructed to have a population mean of 100 and population
standard deviation of 15. The goal is to predict the leaving Exam
scores from the VRQ scores while accounting for the primary and
secondary school cross-classifications.
_ S_ o_ u_ r_ c_ e:
Data Obtainable from:
<https://www.bristol.ac.uk/cmm/team/hg/msm-3rd-ed/datasets.html>
_ R_ e_ f_ e_ r_ e_ n_ c_ e_ s:
Goldstein, H. (2011). Multilevel Statistical Models, 4th Edition.
Chapter 12: Cross-classified data structures (pages 243-254).
doi:10.1002/9780470973394 <https://doi.org/10.1002/9780470973394>
Paterson, L. (1991). Socio-economic status and educational
attainment: a multidimensional and multilevel study. Evaluation
and Research in Education, 5, 97-121.
doi:10.1080/09500799109533303
<https://doi.org/10.1080/09500799109533303>
_ E_ x_ a_ m_ p_ l_ e_ s:
# load 'exam' help file
?exam
# load data
data(exam)
# header of data
head(exam)
# fit model
mod <- gammi(Exam.score ~ VRQ.score, data = exam,
random = ~ (1 | Primary.school) + (1 | Secondary.school))
# plot results
plot(mod)
# summarize results
summary(mod)
# variance parameters
mod$VarCorr
>
> # load data
> data(exam)
>
> # header of data
> head(exam)
VRQ.score Exam.score Primary.school Secondary.school
1 111 10 1 9
2 100 3 1 9
3 86 2 1 9
4 94 3 1 9
5 70 2 1 9
6 83 2 1 9
>
> # fit model
> mod <- gammi(Exam.score ~ VRQ.score, data = exam,
+ random = ~ (1 | Primary.school) + (1 | Secondary.school))
Error in crossprod(x, y) :
requires numeric/complex matrix/vector arguments
Calls: gammi ... gammi.formula -> gammi.default -> rbind -> crossprod
Execution halted
- checking PDF version of manual ... [3s/3s] OK
- DONE
Status: 1 ERROR
- using check arguments '--no-clean-on-error '