Last updated on 2025-12-21 17:51:22 CET.
| Package | ERROR | OK |
|---|---|---|
| effClust | 4 | 9 |
Current CRAN status: ERROR: 4, OK: 9
Version: 0.8.0
Check: examples
Result: ERROR
Running examples in ‘effClust-Ex.R’ failed
The error most likely occurred in:
> base::assign(".ptime", proc.time(), pos = "CheckExEnv")
> ### Name: effClust.default
> ### Title: Compute Approximate Effective Number of Clusters for Regression
> ### Coefficients
> ### Aliases: effClust.default effClust.fixest effClust.formula effClust.lm
> ### effClust.plm effClust
>
> ### ** Examples
>
> # some data with correlated errors
> set.seed(85914270)
> G <- 50
> cl.sizes <- sample(10:100, G, replace=TRUE)
> n <- sum(cl.sizes)
> id <- rep(1:G, cl.sizes)
> X1 <- rchisq(n, 5)
> X2 <- ifelse(id %% 4 == 0, 1, 0)
> e <- rnorm(n)
> eg <- rep(rnorm(G), cl.sizes)
> Y <- 1 + 2*X1 + 3*X2 - 1*X1*X2 + e + eg
> d <- data.frame(Y, X1, X2, id)
>
> f1 <- Y ~ X1 + X1:X2 + factor(id)
> f2 <- Y ~ X1 + X1:X2 | id # fixest syntax
>
> r <- lm(f1, data=d)
>
> effClust(r, ~d$id, exclude=c("factor\\(id\\)","Intercept"))
X1 X1:X2
27.94599 16.82615
> effClust(f2, ~id, data=d)
X1 X1:X2
27.94599 16.82615
>
> library(data.table)
Attaching package: ‘data.table’
The following object is masked from ‘package:base’:
%notin%
> setDT(d)
> d[ , `:=`(X1dot = X1 - mean(X1),
+ X2dot = X2 - mean(X2),
+ X1X2dot = X1*X2 - mean(X1*X2)),
+ by = id]
Error in `[.data.table`(d, , `:=`(X1dot = X1 - mean(X1), X2dot = X2 - :
attempt access index 4/4 in VECTOR_ELT
Calls: [ -> [.data.table
Execution halted
Flavors: r-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Version: 0.8.0
Check: examples
Result: ERROR
Running examples in ‘effClust-Ex.R’ failed
The error most likely occurred in:
> ### Name: effClust.default
> ### Title: Compute Approximate Effective Number of Clusters for Regression
> ### Coefficients
> ### Aliases: effClust.default effClust.fixest effClust.formula effClust.lm
> ### effClust.plm effClust
>
> ### ** Examples
>
> # some data with correlated errors
> set.seed(85914270)
> G <- 50
> cl.sizes <- sample(10:100, G, replace=TRUE)
> n <- sum(cl.sizes)
> id <- rep(1:G, cl.sizes)
> X1 <- rchisq(n, 5)
> X2 <- ifelse(id %% 4 == 0, 1, 0)
> e <- rnorm(n)
> eg <- rep(rnorm(G), cl.sizes)
> Y <- 1 + 2*X1 + 3*X2 - 1*X1*X2 + e + eg
> d <- data.frame(Y, X1, X2, id)
>
> f1 <- Y ~ X1 + X1:X2 + factor(id)
> f2 <- Y ~ X1 + X1:X2 | id # fixest syntax
>
> r <- lm(f1, data=d)
>
> effClust(r, ~d$id, exclude=c("factor\\(id\\)","Intercept"))
X1 X1:X2
27.94599 16.82615
> effClust(f2, ~id, data=d)
X1 X1:X2
27.94599 16.82615
>
> library(data.table)
Attaching package: ‘data.table’
The following object is masked from ‘package:base’:
%notin%
> setDT(d)
> d[ , `:=`(X1dot = X1 - mean(X1),
+ X2dot = X2 - mean(X2),
+ X1X2dot = X1*X2 - mean(X1*X2)),
+ by = id]
Error in `[.data.table`(d, , `:=`(X1dot = X1 - mean(X1), X2dot = X2 - :
attempt access index 4/4 in VECTOR_ELT
Calls: [ -> [.data.table
Execution halted
Flavors: r-devel-linux-x86_64-fedora-clang, r-devel-linux-x86_64-fedora-gcc