title: Changelog/NEWS for package plm subtitle: plm - Linear Models for Panel Data - A set of estimators and tests for panel data econometrics - https://cran.r-project.org/package=plm
options("plm.fast" = TRUE)
manually or in your .Rprofile
file (see
?plm.fast
, also for benchmarks), option introduced in plm version 2.4-0.
It is planned to default to "fast mode" for the next CRAN release of
plm (then making package collapse
a hard dependency).options("plm.fast" = TRUE)
is set: In case package
fixest
or lfe
is available locally in addition to package collapse
,
the two-ways fixed transformation is significantly faster compared to the case
if only collapse
is available due to specialised algorithms in these two packages,
all being fully integrated into the usual plm functions/user interfaces
(fixest
is preferred over lfe
, in this case, plm uses internally
collapse::fhdwithin
which in turn uses fixest::demean
. Thanks to Sebastian
Krantz for guidance on this.?pseriesfy
for background and useful examples. (Faster version is executed
if options("plm.fast" = TRUE)
is set, see ?plm.fast
(then internally
using collapse::dapply
)). Thanks to Sebastian Krantz for inspiration.your_pseries[1:(length(your_pseries)-1)] + your_pseries[2:length(your_pseries)]
).effect = "nested"
), check if
argument model = "random"
is set, if not, plm now warns and adjusts
accordingly (will become an error in the future).inst.method = "baltagi"
/ "am"
/ "bms"
), pmg, pcce, purtest.Significant speed improvement (optional, for the time being): A significant
speed-up of the package is available by a newly introduced option called
'plm.fast' such that panel model estimations and others run faster. Set option
'plm.fast' to 'TRUE' by options("plm.fast" = TRUE)
for speed up, switch off by
options("plm.fast" = FALSE)
(switched off speed up is current default).
To have it always switched on, put options("plm.fast" = TRUE)
in your
.Rprofile file. See documentation ?plm.fast
for more information and a
benchmarked example.
Technically, the speed gains are achieved by weaving in the fast data transformation functions provided in Sebastian Krantz' package 'collapse', which needs to be installed ('Suggests' dependency).
Basic functions benefiting from speed-up are currently (used heavily in, e.g., plm()): Between, between, Sum, Within.
for Hadri's test, summary is now applicable.
index.pindex: fixed bug when individual index variable is called "group".
plm-package
) for sake of completeness.fixed bug in vcovG for lagged White terms (make pseudo-diagonal in E(u,v)); affected vcovNW.
documentation updates (mostly text books of Baltagi and Wooldridge to latest editions, references are also more specific now).
pbgtest: fixed/enabled type="F" (F test of lmtest::bgtest) in wrapper pbgtest() and fixed/enabled passing of argument 'order.by' [additional argument in lmtest::bgtest] [tests/testpbgtest.R added, docs updated and extended].
phtest(., method="aux") [Hausman regression-based test]: fixed bug when data contain more cases than there are used in model estimation (due to NA values); avoid calc. of RE model a second time; phtest now also works with between model correctly (fixed degrees of freedom) tests/test_phtest_Hausman_regression.R added.
plm(): original row names of input data are preserved in plm_object\$model, so functions like pmodel.response(), model.frame(), model.matrix(), residuals() return the original row names (and thus fancy row names if those were to be computed by pdata.frame)
as.data.frame.pdata.frame(): respects 'row.names' argument.
pruned 'require' calls to 'lmtest', 'car', 'lattice' and substituted them with proper entries in NAMESPACE.
temporarily commented problematic examples in pbgtest and pdwtest.
fixed "already a pdata.frame" bug in pcdtest.formula.
implemented fixef() method for objects estimated by pggls().
added generic building block and high-level wrappers vcovNW and vcovDC to the namespace.
dataset Parity added to /data.
a 'subset' argument is added to print.summary.plm and summary.pht so that a subset of coefficients may be selected.
fixed a small problem on the printing of the typology of the variables for pht models.
the "name" of the tests is now the formula truncated so that it prints on only one line.
'restrict.matrix' argument added to deal with linear restrictions.
a 'vcov' argument is added to summary.plm so that a variance matrix can be supplied.
the deviance method for panelmodel objects is now exported (12/02).
the Hausman-Taylor now supports the Amemiya-MaCurdy and the Breusch-Mizon-Schmidt version.
a small bug is fixed on the var2lev function to deal the case when there are no factors.
an update method for panelmodel objects is provided.
the Wages example is removed from the pvar man page because it's time consuming.
for unbalanced Hausman-Taylor model, the printing of the error components was wrong, it is now fixed.
the printing of the removed variables (cst or NA) is improved.
the pgmm function has been improved to deal correctly with holes in the cross-sections ; a 'collapse' argument is added to limit the number of gmm instruments.
the CoefTable element of summary.pgmm objects is renamed to coefficients, so that it can easily be extracted using the coef method.
the default value for robust is now TRUE in the summary.pgmm method.
a new argument 'lost.ts' is added to pgmm to select manually the number of lost time series.
almost null columns of instruments are removed (this happens when within/between transformation is performed on between/within series.
plm now accepts three part formulas, the last part being for instruments introduced only in the within form.
the predict method for panelmodel objects is now exported.
plm now estimates systems of equations if a list of formulas is provided as the first argument.
the pccep function, estimating CCEP models a la Pesaran, has been added together with summary and print.summary methods. The function generates objects of a class of their own ("pccep"), much like 'pggls', together with 'panelmodel'.
the pmg function, estimating MG, DMG and CCEMG models a la Pesaran, has been added together with summary and print.summary methods. The function generates objects of a class of their own ("pmg"), much like 'pggls', together with 'panelmodel'. In the future must consider possible merger with 'pvcm'.
the new cipstest function performs a second-generation CIPS test for unit roots on pseries objects.
the new (non-exported) function pmerge is used internally by cipstest to merge lags and differences of a pseries into the original pdata.frame. Will possibly be added to the user space in the future.
an index method is added for panelmodel, pdata.frame and pseries.
a bug in the typology of the variables in pht is fixed.
a bug in vcovBK (matrices degenerating into vectors) is fixed (thx to David Hugh-Jones for bug report).
the Between function now returns a pseries object.
the resid and fitted method now return a pseries object.
the pgmm method has been rewritten; the data frame is first balanced and NAs are then overwritten by 0s.
a typo is corrected in the man page of plm.data.
package AER is now suggested.
a bug in mtest for pgmm models with effect="individual" and transformation="ld" and for the wald test for time.dummies for model with effect="twoways" and transformation="ld" is fixed by modifying namest in pgmm.
there was a bug in pgmm for models with different lags for gmm instruments. The number of time series lost is now the min (and not the max) of the first lags for gmm instruments.
some parts of summary.pgmm only worked correctly for models with time-dummies. It now deals correctly for models with 'individual' effects.
the *.rda files are now compressed.
p-values for the two-tailed versions of plmtest() were wrong and have been fixed. They were divided by 2 instead of multiplied.
fixed error in pggls, model="within" (FEGLS). Added model="fd" (FDGLS).
changed dependency from package 'kinship' to 'bdsmatrix' (as suggested by Terry Therneau after his reorganization of the packages).
fixed DESCRIPTION and NAMESPACE accordingly.
fixed the example in pggls.Rd.
bug corrected in pgmm: ud <- cbind(ud, td.gmm.level) is relevant only for twoways models.
in fitted.plm, the extraction of the index is updated.
the residuals.plm method now has a 'model' argument.
new function r.squared introduced.
pmodel.response.plm is modified: no explicit 'effect' and 'model' arguments anymore (like in model.matrix.plm).
lag.pseries now returns relevant names for the returned factor.
pFormula is modified so that it can handle correctly Formula objects, and not only formula.
pgmm has been completely rewritten with a new 'Formula' interface. Old formula and dynformula interfaces are kept for backward compatibility but won't be maintained in the future.
'subset' and 'na.action' are added to the list of arguments of pgmm and oldpgmm.
lag.pseries is now able to deal with vector arguments for lags, e.g., lag(x, c(1,3)).
suml(x) is replaced by Reduce("+", x).
the documentation has been improved.
the pvalue for purtest(..., type = "madwu") was in error (by a factor of 2).
in formula(dynformula), a bug is fixed so that the endog variable doesn't appear on the RHS if there are no lags.
in pgmm, the extract.data has been rewritten and is much faster.
two new functions vcovBK and vcovSCC have been added.
a 'model' argument is added to pgmm.sys and pgmm.diff (previously, the model name was extracted from the call).
in pgmm, Kt is fixed to 0 when effect="individual".
a new purtest function to perform panel unit root tests.
[[.pdata.frame is modified so that NULL (and not an error message) is returned if an unknown column is selected.
the as.matrix and print methods for pserie objects are now exported.
in summary.plm, the p-value is now computed using a Student distribution and not a normal one.
the lag.pserie method is modified so that it deals correctly with factors, and not only with numeric vectors. The diff.pserie method returns an error if its argument is not numeric.
the instruments-"backward compatibility" stuff in plm is simplified thanks to the new features of Formula.
'pserie' is renamed 'pseries'.
a THANKS file is added.
the [.pdata.frame
function is modified so that [, j] returns a
pseries and not a pdata.frame when j is a single integer, and a
backward compatibility feature is added for the "index" attribute.
Change since version 1-1.4
an 'args' argument is added to plm objects, and the internal function relies now on it (and not on the call as previously).
more attention is paid when one of the estimated components of the variance is negative (warning or error messages result).
pdata.frame objects are re-introduced. They are used to compute model.frames. Extraction from pdata.frames results in 'pserie' objects which have an index attribute.
the print method of ercomp is now exported.
the first argument of pgmm may now be a formula. A lag.form must be provided in this case.
Hausman-Taylor estimation is now performed by the pht function. For backward compatibility reasons, it is still possible to estimate this model with plm.
a relevant error message is added when a within model is estimated with no time-varying variable.
the formula method for dynformula objects is now exported.
a misleading notation was corrected for plm.ht model.
the definition of sigma2\$id for unbalanced ht model is corrected, a harmonic mean of Ti being used.
the definition of tss.default is simplified.
the fitted.values element was missing for plm objects and has been added.
part of the "details" section of the fixef.plm man page is removed.
a fitted.value method is now available for plm objects. It returns the fitted values of the untransformed response.
in pdiff, a drop=FALSE is added. This omission was responsible for a bug while estimating a model like plm(inv~value-1, data = Grunfeld, model = "fd").
the lev2var is changed so that it doesn't result in an error when the data.frame contains no factor: this was responsible for a bug in plm.ht.
in fixef, the 'effect' argument default is now NULL: fixef(model_with_time_effect) now works correctly.
in pFtest, the error message "the arguments should be a within and a pooling model" is removed so that two within models may be provided.
for backward compatibility reasons, function pvcovHC is reintroduced.
for backward compatibility reasons, argument 'test' of pbsytest may be indicated in upper case.
we switched back to old names for two arguments of plm ercomp -> random.methods ivar -> inst.method -> ivar.
amemiya method is not implemented for unbalanced panels: an error message is now returned.
the plm function has been completely rewritten.
the names of some arguments have changed (random.methods -> ercomp, inst.method -> ivar), the old names are accepted with a warning.
the 'instruments' argument is removed, instrumental variable estimation is performed using extended formula. The 'instruments' argument is still accepted with a warning.
the 'model' element of plm objects are now ordinary data.frame, and not data.frame with elements y and X. Moreover, this data.frame contains untransformed data.
the data sets which are relevant for panel data estimation that where previously in the 'Ecdat' package are now in the plm package.
in pvcm a bug when the estimation was made on a subset is fixed.
ercomp is a stand alone function which returns the estimation of the components of the variance of the errors.
the estimation of two-ways within model is now implemented for unbalanced panels.
the fixef method is much improved, the fixed effects may be computed in levels, in deviation from the first level or in deviation from the overall mean.
in pbsytest, the arguments test are now in lowercase.
the pvcovHC function is replaced by suitable vcovHC methods for panelmodel and pgmm models.
lag and diff methods for pseries are now exported and therefore behave correctly.
for two-ways within models with instrumental variables, K is replaced by K+1 for the computation of the overall mean matrix of the instruments. Time fixef are now computed. The error message "impossible ..." is removed.
a bug in the time random effect model is corrected.
a model.matrix method for panelmodel is provided.
models without intercept (-1 in the formula) should now be consistently estimated with plm, pggls and pvcm.
plm depends now on the 'Formula' package which provides useful tools for formula with two parts.
a lot of typos of the man pages have been fixed.
functions pcdtest, pcdres have been added.
for Hausman-Taylor model, summary now prints the variables and not the effects.
the estimation of a model with only one explanatory variable using plm with method = "fd" is now working correctly.
in plm.formula, [int.row.names] is replaced by [as.character(int.row.names)].
the degrees of freedom for a within time effect model was wrong and has been corrected.
the arguments 'type' and 'weights' in pvcovHC.panelmodel are renamed to 'method' and 'type', respectively. The default method (type in previous versions) is "arellano"" and not "white1".
honda is now the default option for plmtest.
the coefficients method for objects of class pgmm is now exported.
a bug in the plm method of plmtest has been fixed.
in plmtest, for argument 'effect' value "id" is renamed "individual".
three testing functions are added : pbsytest (Bera, Sosa-Escudero and Yoon test), pARtest (Breusch-Godfrey test) and pDWtest (Durbin-Watson test) (later renamed to pdwtest), pwartest, pBGtest (later renamed to pbgtest), pwtest, and pbltest.
plm, pvcm and pggls now have arguments "subset" and "na.action".
phtest, pFtest, plmtest now have a formula method.
a bug is fixed for the vcov of the within model.
the pdata.frame function and class is suppressed. The package now use ordinary data.frames.
pdata.frame is much faster thanks to a modification of the pvar function.
series with only NA values or with constants values are now removed by pdata.frame.
observations are ordered by id and time by pdata.frame.
a pfix function is added to edit a pdata.frame.
a as.data.frame function is provided to coerce a pdata.frame to a data.frame.
the dependency to the 'Matrix' package has been removed and pgmm is much faster now.
phtest has been fixed to return only positive values of the statistic.
pgmm objects now inherit from panelmodel like other estimators and print correctly.
a bug in summary.pgmm has been fixed.
Models with only one explanatory variable resulted in an error. This has been fixed.
Estimation methods are now available with these four functions : plm, pvcm, pggls, and pgmm instead of one (plm) in the previous version.
pvcm is a new function which estimates variable coefficients models. The "nopool" model is now part of it.
pggls is a new function which enables the estimation of general FGLS.
pgmm is a new function for general method of moments estimator.
for all estimation functions, the first four arguments are now 'formula', 'data', 'effect', 'model'.
robust inference is now provided by the pvcovHC function.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.