evaluation: Multidimensional poverty evaluation

Description Usage Arguments Value References Examples

View source: R/evaluation.R

Description

Given a partial order (arguments profiles for the set of profiles and/or zeta for the incidence matrix) a selected threshold, the function returns an object of S3 class parsec, a list of objects described in Value section. In particular the function returns the identification function, different gap measures and, if required, an inequality measure. Moreover the list contains starting data informations and computational details.

Results are obtained by uniform sampling of the linear extensions of the poset, by using the Bubley Dyer (1999) algorithm.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
evaluation(
    profiles = NULL,
    threshold,
    error = 10^(-3),
    zeta = getzeta(profiles),
    weights = {
        if (!is.null(profiles)) 
            profiles$freq
        else rep(1, nrow(zeta))
    },
    distances = {
        n <- nrow(zeta)
        matrix(1, n, n) - diag(1, n)
    },
    linext = lingen(zeta),
    nit = floor({
        n <- nrow(zeta)
        n^5 * log(n) + n^4 * log(error^(-1))
    }),
    maxint = 2^31 - 1,
    inequality = TRUE
)

Arguments

profiles

an object of S3 class wprof.

threshold

a vector to select profiles as threshold. It can be a vector of indexes (numeric), a vector of profiles names (character) or a boolean vector as long as the number of profiles.

error

the error of approximation of the frequencies to the uniformity to sample the linear extensions.

zeta

the incidence matrix of the poset. An object of S3 class incidence. By default extracted by profiles and the orders of the variables modalities.

weights

weights to assign to profiles. If the argument profiles is not NULL, by default weights are equal to profiles frequencies, else, by default weights are set equal to 1.

distances

matrix of distances between profiles. The matrix has to be square, the dimensions have to be equal to the number of profiles and complete. Even if the matrix is complete, the distance between two profiles profiles is considered only if one profile covers the other.

linext

the initializing linear extension, by default generated by lingen(zeta), but it can be forced by the user through a ranks vector.

nit

Number Of Iterations, by default evaluated from a formula of Karzanov and Khachiyan from the number of profiles and the argument error (see Bubley and Dyer, 1999). The user can change it, but the results will not comply the defined error.

maxint

Maximum integer. By default the maximum integer obtainable in a 32bit system. This argument is used to groups the iterations and run different times the compiled C library, in order to avoid memory indexing problems. Therefore the user can set a lower value to maxint in case of low RAM availability. Furthermore, during the evaluation, a progress bar will appear indicating the relative number of iterations groups evaluated.

inequality

differently from the other measures, the complexity of the algorithm used to evaluate inequality is more than linear, therefore, the user can choose if evaluate inequality with this boolean parameter (by default TRUE).

Value

profiles

an object of S3 class wprof reporting the poset profiles and their frequencies.

number_of_profiles

number of profiles.

number_of_variables

number of variables.

incidence

S3 class incidence, the incidence matrix of the poset.

cover

S3 class cover, the cover matrix of the poset.

threshold

boolean vector indicating whether a profile belongs to the threshold.

number_of_iterations

number of iterations performed by the Bubley Dyer algorithm.

rank_relative_frequencies

matrix that by rows reports the relative frequencies distribution of the ranks for each profile.

threshold_relative_frequencies

vector that reports the relative frequency of the times a profile is used as threshold in the sampled linear extensions. This result is useful for posterior valuation of the poset threshold.

profiles_weights

vector of weights assigned to each profile.

edges_weights

matrix of distances between profiles, used to evaluate the measures of gap.

identification_function

vector that reports the relative frequency of times that a profile is equal or lower than the threshold of the linear extension.

point_absolute_poverty_gap

vector that reports the average absolute distance from the first profile greater than the threshold of the linear extension. This gap is set equal to 0 when the profile is greater than the threshold in the linear extension.

point_relative_poverty_gap

the previous absolute distance is divided by its maximum possible value, that is the absolute distance of the first profile greater than the threshold from the minimal element in the linear extension.

point_absolute_wealth_gap

vector that reports the average absolute distance from the threshold of the linear extension. This gap is set equal to 0 when the profile is lower than or equal to the threshold in the linear extension.

point_relative_wealth_gap

the previous absolute distance is divided by its maximum possible value, that is the absolute distance of the threshold from the maximal element in the linear extension.

poverty_gap

mean over the profiles of point_relative_poverty_gap with weights equal to profiles_weights

wealth_gap

mean over the profiles of point_relative_wealth_gap with weights equal to profiles_weights

inequality

when the argument inequality is TRUE, the average value of the inequality index over the linear extensions (see Fattore and Arcagni, 2013).

References

Bubley R., Dyer M. (1999), Faster random generation of linear extensions, Discrete Math., 201, 81-88.

Fattore M., Arcagni A. (2013), Measuring multidimensional polarization with ordinal data, SIS 2013 Statistical Conference, BES-M3.1 - The BES and the challenges of constructing composite indicators dealing with equity and sustainability

Examples

1
2
3
4
5
6
7
profiles <- var2prof(varlen = c(3, 2, 4))
threshold <- c("311", "112")

res <- evaluation(profiles, threshold, maxint = 10^5)

summary(res)
plot(res)

parsec documentation built on May 2, 2019, 6:08 p.m.