ComplexIN: Complex index numbers

ComplexINR Documentation

Complex index numbers

Description

ComplexIN computes the aggregation of a set of index numbers using the arithmetic, geometric or harmonic means.

Usage

ComplexIN(data, means = c("arithmetic", "geometric", "harmonic"), zero.rm = TRUE, 
          na.rm = TRUE, ...)

Arguments

data

Data frame containing, the index numbers to aggregate.

means

Character vector with the name of the mean to compute. mean can be arithmetic, geometric or harmonic.

zero.rm

Logical string for geometric and harmonic means. TRUE (default) indicates that negative and zero values should be deleted before computing the geometric mean and that zero values should be deleted before computing the harmonic mean.

na.rm

Logical value indicating whether NA values should be stripped before the computation proceeds. It is TRUE by default.

...

Further arguments passed to or from other methods.

Details

Sindex, Deflat, priceIndexNum.

Value

Matrix with as many rows as columns of x and as many columns as means selected.

Examples


df <- data.frame(Index=round(runif(12,80,105),2))
ComplexIN(df, means = c("arithmetic", "geometric", "harmonic"))

RcmdrPlugin.TeachStat documentation built on Nov. 14, 2023, 5:08 p.m.