lmdi: Log-Mean Divisia Index (LMDI) decomposition analysis

View source: R/lmdi.R

lmdiR Documentation

Log-Mean Divisia Index (LMDI) decomposition analysis

Description

Performs log-mean divisia index decomposition analysis on a suitably-formatted data frame.

Usage

lmdi(
  .lmdidata,
  time = "Year",
  X = "X",
  fillrow = NULL,
  V = "V",
  Z = "Z",
  deltaV = "dV",
  D = "D"
)

Arguments

.lmdidata

a grouped data frame. Group by columns of variables within which you want an LMDI analysis conducted. time should not be one of the grouping variables.

time

the name of the column in .lmdidata that contains times at which data are available (a string). Default is "Year".

X

the name (as a string) of a column in .lmdidata containing X matrices with named rows representing subcategories of the energy aggregate (V) and named columns representing factors contributing to changes in V over time. Default is "X".

fillrow

a row vector of type matrix passed to Z_byname(). (See Z_byname() for details.)

V

the name for the V output column (a string). Default is "V".

Z

the name for the Z output column (a string). Default is "Z".

deltaV

the name for the deltaV output column (a string). Default is "dV".

D

the name for the D output column (a string). Default is "D".

Value

a data frame containing several columns.


MatthewHeun/LMDIR documentation built on Jan. 13, 2024, 4:10 a.m.