idn: Multidimensional poverty evaluation (only Identification...

Description Usage Arguments Value References Examples

View source: R/idn.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. This function retuns only the identification function. See evaluation to obtain also the gaps and the inequality measures. This function is a simplified and faster version to obtain only the identification function.

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
idn(
    profiles = NULL,
    threshold,
    error = 10^(-3),
    zeta = getzeta(profiles),
    weights = {
        if (!is.null(profiles)) 
            profiles$freq
        else rep(1, nrow(zeta))
    },
    linext = lingen(zeta),
    nit = floor({
        n <- nrow(zeta)
        n^5 * log(n) + n^4 * log(error^(-1))
    }),
    maxint = 2^31 - 1
)

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.

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.

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

NA use evaluation to obtain this result.

point_relative_poverty_gap

NA use evaluation to obtain this result.

point_absolute_wealth_gap

NA use evaluation to obtain this result.

point_relative_wealth_gap

NA use evaluation to obtain this result.

poverty_gap

NA use evaluation to obtain this result.

wealth_gap

NA use evaluation to obtain this result.

inequality

NA use evaluation to obtain this result.

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 <- idn(profiles, threshold, maxint = 10^5)

summary(res)
plot(res)

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