Last updated on 2024-06-15 17:57:33 CEST.
Flavor | Version | Tinstall | Tcheck | Ttotal | Status | Flags |
---|---|---|---|---|---|---|
r-devel-linux-x86_64-debian-clang | 0.12.1 | 151.32 | 368.78 | 520.10 | OK | |
r-devel-linux-x86_64-debian-gcc | 0.12.1 | 110.46 | 258.62 | 369.08 | OK | |
r-devel-linux-x86_64-fedora-clang | 0.12.1 | 714.65 | NOTE | |||
r-devel-linux-x86_64-fedora-gcc | 0.12.1 | 730.39 | OK | |||
r-devel-windows-x86_64 | 0.12.0 | 115.00 | 296.00 | 411.00 | ERROR | |
r-patched-linux-x86_64 | 0.12.0 | 139.65 | 350.16 | 489.81 | OK | |
r-release-linux-x86_64 | 0.12.0 | 126.93 | 349.32 | 476.25 | OK | |
r-release-macos-arm64 | 0.12.1 | 183.00 | NOTE | |||
r-release-macos-x86_64 | 0.12.1 | 460.00 | NOTE | |||
r-release-windows-x86_64 | 0.12.1 | 115.00 | 303.00 | 418.00 | NOTE | |
r-oldrel-macos-arm64 | 0.12.1 | 199.00 | FAIL | |||
r-oldrel-macos-x86_64 | 0.12.1 | 358.00 | ERROR | |||
r-oldrel-windows-x86_64 | 0.12.1 | 107.00 | 337.00 | 444.00 | NOTE |
Version: 0.12.1
Check: installed package size
Result: NOTE
installed size is 6.9Mb
sub-directories of 1Mb or more:
R 1.4Mb
doc 3.6Mb
Flavors: r-devel-linux-x86_64-fedora-clang, r-release-macos-arm64, r-release-macos-x86_64, r-release-windows-x86_64, r-oldrel-macos-arm64, r-oldrel-macos-x86_64, r-oldrel-windows-x86_64
Version: 0.12.0
Check: installed package size
Result: NOTE
installed size is 7.6Mb
sub-directories of 1Mb or more:
R 1.4Mb
doc 3.6Mb
libs 1.5Mb
Flavor: r-devel-windows-x86_64
Version: 0.12.0
Check: tests
Result: ERROR
Running 'fixest_tests.R' [7s]
Running the tests in 'tests/fixest_tests.R' failed.
Complete output:
> #----------------------------------------------#
> # Author: Laurent Berge
> # Date creation: Fri Jul 10 09:03:06 2020
> # ~: package sniff tests
> #----------------------------------------------#
>
> # Not everything is currently covered, but I'll improve it over time
>
> # Some functions are not trivial to test properly though
>
> library(fixest)
>
> test = fixest:::test ; chunk = fixest:::chunk
> vcovClust = fixest:::vcovClust
> stvec = stringmagic::string_vec_alias()
>
> setFixest_notes(FALSE)
>
> if(fixest:::is_r_check()){
+ if(requireNamespace("data.table", quietly = TRUE)){
+ library(data.table)
+ data.table::setDTthreads(1)
+ }
+ setFixest_nthreads(1)
+ }
>
> ####
> #### ESTIMATIONS ####
> ####
>
> ####
> #### ... Main ####
> ####
>
>
> chunk("ESTIMATION")
ESTIMATION
>
> set.seed(0)
>
> base = iris
> names(base) = c("y", "x1", "x2", "x3", "species")
> base$fe_2 = rep(1:5, 30)
> base$fe_3 = sample(15, 150, TRUE)
> base$constant = 5
> base$y_int = as.integer(base$y)
> base$w = as.vector(unclass(base$species) - 0.95)
> base$offset_value = unclass(base$species) - 0.95
> base$y_01 = 1 * ((scale(base$x1) + rnorm(150)) > 0)
> # what follows to avoid removal of fixed-effects (logit is pain in the neck)
> base$y_01[1:5 + rep(c(0, 50, 100), each = 5)] = 1
> base$y_01[6:10 + rep(c(0, 50, 100), each = 5)] = 0
> # We enforce the removal of observations
> base$y_int_null = base$y_int
> base$y_int_null[base$fe_3 %in% 1:5] = 0
>
> for(model in c("ols", "pois", "logit", "negbin", "Gamma")){
+ cat("Model: ", format(model, width = 6), sep = "")
+ for(use_weights in c(FALSE, TRUE)){
+ my_weight = NULL
+ if(use_weights) my_weight = base$w
+
+ for(use_offset in c(FALSE, TRUE)){
+ my_offset = NULL
+ if(use_offset) my_offset = base$offset_value
+
+ for(id_fe in 0:9){
+
+ cat(".")
+
+ tol = switch(model, "negbin" = 1e-2, "logit" = 3e-5, 1e-5)
+
+ # Setting up the formula to accommodate FEs
+ if(id_fe == 0){
+ fml_fixest = fml_stats = y ~ x1
+ } else if(id_fe == 1){
+ fml_fixest = y ~ x1 | species
+ fml_stats = y ~ x1 + factor(species)
+ } else if(id_fe == 2){
+ fml_fixest = y ~ x1 | species + fe_2
+ fml_stats = y ~ x1 + factor(species) + factor(fe_2)
+ } else if(id_fe == 3){
+ # varying slope
+ fml_fixest = y ~ x1 | species[[x2]]
+ fml_stats = y ~ x1 + x2:species
+ } else if(id_fe == 4){
+ # varying slope -- 1 VS, 1 FE
+ fml_fixest = y ~ x1 | species[[x2]] + fe_2
+ fml_stats = y ~ x1 + x2:species + factor(fe_2)
+ } else if(id_fe == 5){
+ # varying slope -- 2 VS
+ fml_fixest = y ~ x1 | species[x2]
+ fml_stats = y ~ x1 + x2:species + species
+ } else if(id_fe == 6){
+ # varying slope -- 2 VS bis
+ fml_fixest = y ~ x1 | species[[x2]] + fe_2[[x3]]
+ fml_stats = y ~ x1 + x2:species + x3:factor(fe_2)
+ } else if(id_fe == 7){
+ # Combined clusters
+ fml_fixest = y ~ x1 + x2 | species^fe_2
+ fml_stats = y ~ x1 + x2 + paste(species, fe_2)
+ } else if(id_fe == 8){
+ fml_fixest = y ~ x1 | species[x2] + fe_2[x3] + fe_3
+ fml_stats = y ~ x1 + species + i(species, x2) + factor(fe_2) + i(fe_2, x3) + factor(fe_3)
+ } else if(id_fe == 9){
+ fml_fixest = y ~ x1 | species + fe_2[x2,x3] + fe_3
+ fml_stats = y ~ x1 + species + factor(fe_2) + i(fe_2, x2) + i(fe_2, x3) + factor(fe_3)
+ }
+
+ # ad hoc modifications of the formula
+ if(model == "logit"){
+ fml_fixest = xpd(y_01 ~ ..rhs, ..rhs = fml_fixest[[3]])
+ fml_stats = xpd(y_01 ~ ..rhs, ..rhs = fml_stats[[3]])
+
+ # The estimations are OK, conv differences out of my control
+ if(id_fe %in% 8:9) tol = 0.5
+
+ } else if(model == "pois"){
+ fml_fixest = xpd(y_int_null ~ ..rhs, ..rhs = fml_fixest[[3]])
+ fml_stats = xpd(y_int_null ~ ..rhs, ..rhs = fml_stats[[3]])
+
+ } else if(model %in% c("negbin", "Gamma")){
+ fml_fixest = xpd(y_int ~ ..rhs, ..rhs = fml_fixest[[3]])
+ fml_stats = xpd(y_int ~ ..rhs, ..rhs = fml_stats[[3]])
+ }
+
+ adj = 1
+ if(model == "ols"){
+ res = feols(fml_fixest, base, weights = my_weight, offset = my_offset)
+ res_bis = lm(fml_stats, base, weights = my_weight, offset = my_offset)
+
+ } else if(model %in% c("pois", "logit", "Gamma")){
+ adj = 0
+ if(model == "Gamma" && use_offset) next
+
+ my_family = switch(model, pois = poisson(), logit = binomial(), Gamma = Gamma())
+
+ res = feglm(fml_fixest, base, family = my_family, weights = my_weight, offset = my_offset)
+
+ if(!is.null(res$obs_selection$obsRemoved)){
+ qui = res$obs_selection$obsRemoved
+
+ # I MUST do that.... => subset does not work...
+ base_tmp = base[qui, ]
+ base_tmp$my_offset = my_offset[qui]
+ base_tmp$my_weight = my_weight[qui]
+ res_bis = glm(fml_stats, base_tmp, family = my_family, weights = my_weight, offset = my_offset)
+ } else {
+ res_bis = glm(fml_stats, data = base, family = my_family, weights = my_weight, offset = my_offset)
+ }
+
+ } else if(model == "negbin"){
+ # no offset in glm.nb + no VS in fenegbin + no weights in fenegbin
+ if(use_weights || use_offset || id_fe > 2) next
+
+ res = fenegbin(fml_fixest, base, notes = FALSE)
+ res_bis = MASS::glm.nb(fml_stats, base)
+
+ }
+
+ test(coef(res)["x1"], coef(res_bis)["x1"], "~", tol)
+ test(se(res, se = "st", ssc = ssc(adj = adj))["x1"], se(res_bis)["x1"], "~", tol)
+ test(pvalue(res, se = "st", ssc = ssc(adj = adj))["x1"], pvalue(res_bis)["x1"], "~", tol*10**(model == "negbin"))
+ # cat("Model: ", model, ", FE: ", id_fe, ", weight: ", use_weights, ", offset: ", use_offset, "\n", sep="")
+
+ }
+ cat("|")
+ }
+ }
+ cat("\n")
+ }
Model: ols ..........|..........|..........|..........|
Model: pois ..........|..........|..........|..........|
Model: logit ..........|..........|..........|..........|
Model: negbin..........|..........|..........|..........|
Model: Gamma ..........|..........|..........|..........|
There were 36 warnings (use warnings() to see them)
>
> ####
> #### ... Corner cases ####
> ####
>
> chunk("Corner cases")
CORNER CASES
>
>
> # We test the absence of bugs
>
> base = iris
> names(base) = c("y", "x1", "x2", "x3", "fe1")
> base$fe2 = rep(1:5, 30)
> base$y[1:5] = NA
> base$x1[4:8] = NA
> base$x2[4:21] = NA
> base$x3[110:111] = NA
> base$fe1[110:118] = NA
> base$fe2[base$fe2 == 1] = 0
> base$fe3 = sample(letters[1:5], 150, TRUE)
> base$period = rep(1:50, 3)
> base$x_cst = 1
>
> res = feols(y ~ 1 | csw(fe1, fe1^fe2), base)
>
> res = feols(y ~ 1 + csw(x1, i(fe1)) | fe2, base)
>
> res = feols(y ~ csw(f(x1, 1:2), x2) | sw0(fe2, fe2^fe3), base, panel.id = ~ fe1 + period)
>
> res = feols(d(y) ~ -1 + d(x2), base, panel.id = ~ fe1 + period)
> test(length(coef(res)), 1)
>
> res = feols(c(y, x1) ~ 1 | fe1 | x2 ~ x3, base)
Flavor: r-devel-windows-x86_64
Version: 0.12.1
Check: R code for possible problems
Result: FAIL
Flavor: r-oldrel-macos-arm64
Version: 0.12.1
Check: running R code from vignettes
Result: ERROR
Errors in running code in vignettes:
when running code in ‘fixest_walkthrough.Rmd’
...
x1 0.983110 0.052699 18.6551 1.6762e-08 ***
---
Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
RMSE: 4.89686 Adj. R2: 0.262357
> summary(est, "newey_west")
When sourcing ‘fixest_walkthrough.R’:
Error: To compute the Newey-West VCOV, we need a variable for the time. Since you didn't provide it in the formula, we typically deduce it from the 'panel.id' identifiers. PROBLEM: no 'panel.id' was set in this estimation. Please provide it in the formula.
Execution halted
‘exporting_tables.Rmd’ using ‘UTF-8’... [2s/3s] OK
‘fixest_walkthrough.Rmd’ using ‘UTF-8’... failed
‘multiple_estimations.Rmd’ using ‘UTF-8’... [2s/3s] OK
‘standard_errors.Rmd’ using ‘UTF-8’... [3s/4s] OK
Flavor: r-oldrel-macos-x86_64