* using log directory ‘/data/blackswan/ripley/R/packages/tests-devel/eatRep.Rcheck’ * using R Under development (unstable) (2022-07-04 r82541) * using platform: x86_64-pc-linux-gnu (64-bit) * using session charset: UTF-8 * checking for file ‘eatRep/DESCRIPTION’ ... OK * checking extension type ... Package * this is package ‘eatRep’ version ‘0.14.4’ * 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 ‘eatRep’ can be installed ... [18s/18s] OK * checking package directory ... OK * checking ‘build’ 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 ... 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 loading without being on the library search path ... 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 ... [24s/24s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd line widths ... 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 ... OK * checking LazyData ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from ‘inst/doc’ ... OK * checking files in ‘vignettes’ ... OK * checking examples ... OK * checking examples with --run-donttest ... [14s/14s] ERROR Running examples in ‘eatRep-Ex.R’ failed The error most likely occurred in: > ### Name: repGlm > ### Title: Replication methods (JK1, JK2 and BRR) for linear regression > ### models and trend estimation. > ### Aliases: repGlm jk2.glm > > ### ** Examples > > ### load example data (long format) > data(lsa) > ### use only the first nest > bt <- lsa[which(lsa[,"nest"] == 1),] > ### use only data from 2010 > bt2010 <- bt[which(bt[,"year"] == 2010),] > ## use only reading data > bt2010read <- bt2010[which(bt2010[,"domain"] == "reading"),] > > ### Example 1: Computes linear regression from reading score on gender separately > ### for each country. Assume no nested structure. > mod1 <- repGlm(datL = bt2010read, ID = "idstud", wgt = "wgt", type = "jk2", + PSU = "jkzone", repInd = "jkrep", imp = "imp", groups = "country", + formula = score~sex, family ="gaussian") 1 analyse(s) overall according to: 'group.splits = 1'. Assume unnested structure with 3 imputations. Create 92 replicate weights according to JK2 procedure. Warning in get.dfcom(object, dfcom) : Infinite sample size assumed. Warning in get.dfcom(object, dfcom) : Infinite sample size assumed. Warning in get.dfcom(object, dfcom) : Infinite sample size assumed. > res1 <- report(mod1, printGlm = TRUE) Trend group: 'noTrend'. groups: country = countryA dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 508.406 4.321 117.651 0.000 *** 2 sexmale 6.088 5.831 1.044 0.297 R-squared: 0.002; SE(R-squared): NA Nagelkerkes R-squared: 1; SE(Nagelkerkes R-squared): NA 1034 observations and 1032 degrees of freedom. ------------------------------------------------------------------ groups: country = countryB dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 502.607 5.049 99.554 0.000 *** 2 sexmale 11.005 7.177 1.533 0.126 R-squared: 0.005; SE(R-squared): NA Nagelkerkes R-squared: NaN; SE(Nagelkerkes R-squared): NA 959 observations and 957 degrees of freedom. ------------------------------------------------------------------ groups: country = countryC dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 526.287 3.949 133.267 0.000 *** 2 sexmale 15.268 5.873 2.600 0.009 ** R-squared: 0.009; SE(R-squared): NA Nagelkerkes R-squared: NaN; SE(Nagelkerkes R-squared): NA 1086 observations and 1084 degrees of freedom. > > ## No test: > ### Example 2: Computes log linear regression from pass/fail on ses and gender > ### separately for each country in a nested structure. Assuming equally weighted > ### cases by omitting "wgt" argument > dat <- lsa[intersect(which(lsa[,"year"] == 2010), which(lsa[,"domain"] == "reading")),] > mod2 <- repGlm(datL = dat, ID = "idstud", type = "JK2", PSU = "jkzone", + repInd = "jkrep", imp = "imp", nest="nest", groups = "country", + formula = passReg~sex*ses, family = quasibinomial(link="logit")) Method 'mice' is not available for nested imputation. Switch to method 'scalar'. 1 analyse(s) overall according to: 'group.splits = 1'. Assume nested structure with 2 nests and 3 imputations in each nest. This will result in 2 x 3 = 6 imputation replicates. Create 92 replicate weights according to JK2 procedure. > res2 <- report(mod2, printGlm = TRUE) Trend group: 'noTrend'. groups: country = countryA dependent Variable: passReg parameter est se t.value p.value sig 1 (Intercept) -1.765 0.357 -4.949 0.000 *** 2 ses 0.027 0.005 4.929 0.000 *** 3 sexmale -0.055 0.443 -0.125 0.901 4 sexmale:ses 0.004 0.008 0.435 0.663 R-squared: 0.074; SE(R-squared): 0.001 Nagelkerkes R-squared: 0.098; SE(Nagelkerkes R-squared): 0.001 1034 observations and 1030 degrees of freedom. ------------------------------------------------------------------ groups: country = countryB dependent Variable: passReg parameter est se t.value p.value sig 1 (Intercept) -2.464 0.361 -6.834 0.000 *** 2 ses 0.033 0.007 4.697 0.000 *** 3 sexmale 0.179 0.528 0.339 0.735 4 sexmale:ses 0.000 0.010 0.025 0.980 R-squared: 0.097; SE(R-squared): 0 Nagelkerkes R-squared: 0.13; SE(Nagelkerkes R-squared): 0.001 959 observations and 955 degrees of freedom. ------------------------------------------------------------------ groups: country = countryC dependent Variable: passReg parameter est se t.value p.value sig 1 (Intercept) -1.373 0.313 -4.386 0.000 *** 2 ses 0.028 0.006 4.594 0.000 *** 3 sexmale 0.453 0.413 1.097 0.273 4 sexmale:ses -0.003 0.008 -0.356 0.722 R-squared: 0.069; SE(R-squared): 0 Nagelkerkes R-squared: 0.091; SE(Nagelkerkes R-squared): 0 1086 observations and 1082 degrees of freedom. > > ### Example 3: Like example 1, but without any replication methods > ### trend estimation (without linking error) and nested imputation > dat <- lsa[which(lsa[,"domain"] == "reading"),] > mod3 <- repGlm(datL = dat, ID = "idstud", wgt = "wgt", imp = "imp", nest = "nest", + groups = "country", formula = score~sex, trend = "year") Method 'mice' is not available for nested imputation. Switch to method 'scalar'. Trend group: '2010' 1 analyse(s) overall according to: 'group.splits = 1'. Assume nested structure with 2 nests and 3 imputations in each nest. This will result in 2 x 3 = 6 imputation replicates. Trend group: '2015' 1 analyse(s) overall according to: 'group.splits = 1'. Assume nested structure with 2 nests and 3 imputations in each nest. This will result in 2 x 3 = 6 imputation replicates. Note: No linking error was defined. Linking error will be defaulted to '0'. > res3 <- report(mod3, printGlm = TRUE) Trend group: '2010'. groups: country = countryA; year = 2010 dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 508.643 3.611 140.859 0.000 *** 2 sexmale 6.003 4.962 1.210 0.227 R-squared: 0.002; SE(R-squared): 0 Nagelkerkes R-squared: NaN; SE(Nagelkerkes R-squared): NaN 1034 observations and 1032 degrees of freedom. ------------------------------------------------------------------ groups: country = countryB; year = 2010 dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 503.053 4.483 112.221 0.000 *** 2 sexmale 10.068 6.164 1.633 0.103 R-squared: 0.004; SE(R-squared): 0 Nagelkerkes R-squared: NaN; SE(Nagelkerkes R-squared): NaN 959 observations and 957 degrees of freedom. ------------------------------------------------------------------ groups: country = countryC; year = 2010 dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 526.381 3.684 142.874 0.000 *** 2 sexmale 14.263 5.383 2.649 0.008 ** R-squared: 0.008; SE(R-squared): 0 Nagelkerkes R-squared: NaN; SE(Nagelkerkes R-squared): NaN 1086 observations and 1084 degrees of freedom. ============================================================================ Trend group: '2015'. groups: country = countryA; year = 2015 dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 507.311 3.676 138.010 0.000 *** 2 sexmale 1.158 5.018 0.231 0.818 R-squared: 0; SE(R-squared): 0 Nagelkerkes R-squared: 0.816; SE(Nagelkerkes R-squared): 0.758 1037 observations and 1035 degrees of freedom. ------------------------------------------------------------------ groups: country = countryB; year = 2015 dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 492.666 4.757 103.563 0.000 *** 2 sexmale 6.548 6.390 1.025 0.306 R-squared: 0.002; SE(R-squared): 0 Nagelkerkes R-squared: NaN; SE(Nagelkerkes R-squared): NaN 684 observations and 682 degrees of freedom. ------------------------------------------------------------------ groups: country = countryC; year = 2015 dependent Variable: score parameter est se t.value p.value sig 1 (Intercept) 514.175 3.444 149.311 0.000 *** 2 sexmale 12.004 4.813 2.494 0.013 * R-squared: 0.005; SE(R-squared): 0 Nagelkerkes R-squared: NaN; SE(Nagelkerkes R-squared): NaN 1207 observations and 1205 degrees of freedom. > > ### Example 4: weighted effect coding to estimate whether a specific country's mean > ### differs from the overall mean (whereas the overall population is a composite of > ### all countries). The procedure adapts the weighted effect coding procedures > ### described in te Grotenhuis (2017) for multiple imputation and replication methods. > mod4 <- repGlm(datL = bt2010read, ID = "idstud", wgt = "wgt", type = "jk2", + PSU = "jkzone", repInd = "jkrep", imp = "imp", formula = score~country, + useWec=TRUE) 1 analyse(s) overall according to: 'group.splits = 0'. Assume unnested structure with 3 imputations. Create 92 replicate weights according to JK2 procedure. Error in `colnames<-`(`*tmp*`, value = `*vtmp*`) : attempt to set 'colnames' on an object with less than two dimensions Calls: repGlm ... funadjustLavaanWec -> groupToTotalMeanComparisonLavaan -> colnames<- Execution halted * checking for unstated dependencies in ‘tests’ ... OK * checking tests ... Running ‘testthat.R’ [89s/89s] [89s/89s] OK * checking for unstated dependencies in vignettes ... OK * checking package vignettes in ‘inst/doc’ ... OK * checking re-building of vignette outputs ... OK * checking PDF version of manual ... OK * checking for non-standard things in the check directory ... NOTE Found the following files/directories: ‘nul’ * checking for detritus in the temp directory ... OK * checking for new files in some other directories ... OK * DONE Status: 1 ERROR, 1 NOTE See ‘/data/blackswan/ripley/R/packages/tests-devel/eatRep.Rcheck/00check.log’ for details. Command exited with non-zero status 1 Time 3:43.34, 210.54 + 11.77