Bug fixes:
- In
nlcpd_self_start(strategy="s1")where the base region was not set properly. - In
pricelevels(settings=list(solve="matrix"))where the setting was not supported and is now internally set toiterative. - In
nlcpd(settings=list(use.jac=TRUE)when there were two regions (R=2) leading the matricesBandCinnlcpd_jacobi()to collapse. Solved by addingdrop=FALSEto the two matrices and added tests for this case. - In
lehr(), when some quantities in the data were 0, the function returnedNaN. - Fixed some links to the
minpack.lm-package in the documentation forcpd()andnlcpd().
Improvements and other changes:
- In
pricelevels(settings=list(type=c("a","b""))), no alphabetic ordering by index name of the output if specific indices are provided; alphabetic ordering only ifsettings$type=NULL. - Added the function
geoyoung()for the geometric Young index. Function description, tests and vignette updated. - For
all.pairs=FALSE, the functionsindex.pairs()andgeks()no longer use the price levels where the comparison and base region are the same (e.g.,$P^{11}$ ) as these price levels do not provide valuable interregional information. - The attribute
attr(x, "base")is always added to the function output ofratios()ifstatic=FALSEand base is notNULL. The attribute provides the base region used to calculate the individual price ratios for each product. The treatment of duplicated prices byratios()is now also aligned to the respective treatment by all index formulas in the package, that is, duplicated prices are averaged and ratios derived by dividing the initial prices by the average. - Added the function
pairs()to compute the number of non-redundant index pairs available for a data set. Renamed the functionscomparisons()andsparsity()toproperties()andgaps(). Updated the output ofproperties(). - Introduced the new (non-exported) setting
settings$prods, which removes products with prices in only one region. This is needed because otherwise these products distort the estimation bycpd(),ikle(),gerardi(), and others if weights are used. - Only positive prices are supported. Before, also zero prices were allowed, which cannot be processed by most index formulas, however.
- Introduced the setting of global options
options(pricelevels.[]) - Introduced the plotting of price levels using the new non-exported function
plot.pricelevels() - Adjusted the behavior of
ratios() - Fixed a bug in the non-exported function
arrange()
-
Included the functions
mjevons()inrao()mcarli()inrhajargsaht()mdutot()ingkhamis()mharmonic()inikle()
by setting
q=NULLand/orw=NULL -
Updated the package vignette
-
Updated tests
- New functions
mjevons(),mcarli(),mdutot(), andmharmonic() - In
nlcpd(), introduced matching of lower and upper bounds and replaced argumentpar.startwith the defaultpar - Separated the
gerardi()index from the iterative ones - Duplicated prices are aggregated now as weighted averages instead of unweighted ones in the helper function
arrange() - Updated the package vignette
- Updated tests
In the DESCRIPTION file:
- Updated the package description
- Added a reference to the World Bank's methodological manual
- Included the Authors@R field
- Fixed the 'no visible bindings for global variable' note caused by the use of the data.table-package.
- Replaced
\dontrun{}with\donttest{}in the examples.
- Initial CRAN submission.
- Initial release on Github.