xuyiqing / fect

fixed effect counterfactual estimators
Other
53 stars 20 forks source link

Error occured when run fect #32

Open YongchunFang opened 11 months ago

YongchunFang commented 11 months ago

When I ran 'fect,' it displayed the following error: 'Error: Mat::init(): requested size is too large; suggest enabling ARMA_64BIT_WORD.

xuyiqing commented 11 months ago

Hi, have you (re)installed the most up-to-date version of the package?

On Sat, Sep 23, 2023 at 2:46 AM YongchunFang @.***> wrote:

When I ran 'fect,' it displayed the following error: 'Error: Mat::init(): requested size is too large; suggest enabling ARMA_64BIT_WORD.

— Reply to this email directly, view it on GitHub https://github.com/xuyiqing/fect/issues/32, or unsubscribe https://github.com/notifications/unsubscribe-auth/AB2PKGBCL7NX5LYMVJLAOX3X32VYXANCNFSM6AAAAAA5ECSZN4 . You are receiving this because you are subscribed to this thread.Message ID: @.***>

-- Yiqing Xu

Assistant Professor Department of Political Science Stanford University https://yiqingxu.org/

YongchunFang commented 11 months ago

Thanks for replying to my comment. I have upgraded my R to version 4.3.1 and updated all packages within R, but this error still occurred. Additionally, I downloaded the fect package fect_1.0.0.tar.gz from this link: (https://cran.r-project.org/web/packages/fect/index.html). I also made modifications to the src\fect.h file by adding #define arma_64bit_word 1 before #include , and included pkg_cppflags = -DARMA_64BIT_WORD=1 in both the src\Makevars and src\Makevars.win files. Afterward, I reinstalled the modified fect package. However, I am still encountering this error message. My data contains more than 700,000 observations, and 10 variables. My computer runs on a Windows operating system with 32GB of RAM. Thanks a lot!

The traceback of this error: Error: Mat::init(): requested size is too large; suggest to enable ARMA_64BIT_WORD 6. stop(structure(list(message = "Mat::init(): requested size is too large; suggest to enable ARMA_64BIT_WORD", call = NULL, cppstack = NULL), class = c("std::logic_error", "C++Error", "error", "condition"))) at RcppExports.R#97 5. inter_fe_ub(YY, Y0, X, II, beta0, r.cv, force = force, tol) at fe.R#106 4. fect.fe(Y = Y, D = D, X = X, I = I, II = II, T.on = T.on, T.off = T.off, r.cv = r, T.on.carry = T.on.carry, T.on.balance = T.on.balance, balance.period = balance.period, binary = binary, QR = QR, force = force, hasRevs = hasRevs, tol = tol, boot = 0, norm.para = norm.para, ... at default.R#1429 3. fect.default(formula = NULL, data = data, Y = Yname, D = Dname, X = Xname, group = group, na.rm = na.rm, balance.period = balance.period, fill.missing = fill.missing, index = index, force = force, r = r, lambda = lambda, nlambda = nlambda, CV = CV, k = k, ... at default.R#169 2. fect.formula(eat1 ~ indeed + age_1, data = df, index = c("visitl", "amonth"), method = "fe", force = "two-way", parallel = TRUE) at default.R#82 1. fect(eat1 ~ indeed + age_1, data = df, index = c("visitl", "amonth"), method = "fe", force = "two-way", parallel = TRUE)