ycroissant / plm

Panel Data Econometrics with R
GNU General Public License v2.0
50 stars 13 forks source link

pmg slow #7

Closed waynelapierre closed 3 years ago

waynelapierre commented 3 years ago

I found the pmg function to be really slow even for medium-sized data. Have you considered enhancing pmg or the other functions in plm with C++ codes, just like the fixest package?

tappek commented 3 years ago

pmg and some other functions, most notably plm, benefit from the fast mode which can be switched on by options("plm.fast" = TRUE) (see also the NEWS of the package). At some point in time, the fast mode will be the default but for now it needs to be switched on explictly.

(See also this old thread about pmg in which you were involved: https://github.com/SebKrantz/collapse/issues/120)

The next CRAN release will feature more speed in some cases/functions.

tappek commented 3 years ago

Since yesterday, pmg should be a little faster even without the fast mode, currently only in the development version revision 1283 and higher (and since 2021-09-21 in CRAN version 2.4-2).

tappek commented 2 years ago

pmg should now be again faster due to optimized data processing. To be included in the next CRAN version. One can install the development version which includes the speed-up like this:

# install.packages("remotes") # remove '#' if pkg 'remotes' is not installed
remotes::install_github("ycroissant/plm")
tappek commented 2 years ago

Released on CRAN as plm 2.6-2.