Skip to contents

This imputes any NAs in the data set specified by dset by invoking the function f_i and any optional arguments f_i_para on each column at a time (if impute_by = "column"), or on each row at a time (if impute_by = "row"), or by passing the entire data frame to f_i if impute_by = "df".

Usage

# S3 method for class 'coin'
Impute(
  x,
  dset,
  f_i = NULL,
  f_i_para = NULL,
  impute_by = "column",
  use_group = NULL,
  group_level = NULL,
  normalise_first = NULL,
  out2 = "coin",
  write_to = NULL,
  disable = FALSE,
  warn_on_NAs = TRUE,
  ...
)

Arguments

x

A coin class object

dset

The name of the data set to apply the function to, which should be accessible in .$Data.

f_i

An imputation function. See details.

f_i_para

Further arguments to pass to f_i, other than x. See details.

impute_by

Specifies how to impute: if "column", passes each column (indicator) separately as a numerical vector to f_i; if "row", passes each row separately; and if "df" passes the entire data set (data frame) to f_i. The function called by f_i should be compatible with the type of data passed to it.

use_group

Optional grouping variable name to pass to imputation function if this supports group imputation.

group_level

A level of the framework to use for grouping indicators. This is only relevant if impute_by = "row" or "df". In that case, indicators will be split into their groups at the level specified by group_level, and imputation will be performed across rows of the group, rather than the whole data set. This can make more sense because indicators within a group are likely to be more similar.

normalise_first

Logical: if TRUE, each column is normalised using a min-max operation before imputation. By default this is FALSE unless impute_by = "row". See details.

out2

Either "coin" to return normalised data set back to the coin, or df to simply return a data frame.

write_to

Optional character string for naming the data set in the coin. Data will be written to .$Data[[write_to]]. Default is write_to == "Imputed".

disable

Logical: if TRUE will disable imputation completely and write the unaltered data set. This option is mainly useful in sensitivity and uncertainty analysis (to test the effect of turning imputation on/off).

warn_on_NAs

Logical: if TRUE will issue a warning if there are any NAs detected in the data frame after imputation has been applied. Set FALSE to suppress these warnings.

...

arguments passed to or from other methods.

Value

An updated coin with imputed data set at .$Data[[write_to]]

Details

Clearly, the function f_i needs to be able to accept with the data class passed to it - if impute_by is "row" or "column" this will be a numeric vector, or if "df" it will be a data frame. Moreover, this function should return a vector or data frame identical to the vector/data frame passed to it except for NA values, which can be replaced. The function f_i is not required to replace all NA values.

COINr has several built-in imputation functions of the form i_*() for vectors which can be called by Impute(). See the online documentation for more details.

When imputing row-wise, prior normalisation of the data is recommended. This is because imputation will use e.g. the mean of the unit values over all indicators (columns). If the indicators are on very different scales, the result will likely make no sense. If the indicators are normalised first, more sensible results can be obtained. There are two options to pre-normalise: first is by setting normalise_first = TRUE - this is anyway the default if impute_by = "row". In this case, you also need to supply a vector of directions. The data will then be normalised using a min-max approach before imputation, followed by the inverse operation to return the data to the original scales.

Another approach which gives more control is to simply run Normalise() first, and work with the normalised data from that point onwards. In that case it is better to set normalise_first = FALSE, since by default if impute_by = "row" it will be set to TRUE.

Checks are made on the format of the data returned by imputation functions, to ensure the type and that non-NA values have not been inadvertently altered. This latter check is allowed a degree of tolerance for numerical precision, controlled by the sfigs argument. This is because if the data frame is normalised, and/or depending on the imputation function, there may be a very small differences. By default sfigs = 9, meaning that the non-NA values pre and post-imputation are compared to 9 significant figures.

See also documentation for Impute.data.frame() and Impute.numeric() which are called by this function.

Examples

#' # build coin
coin <- build_example_coin(up_to = "new_coin")
#> iData checked and OK.
#> iMeta checked and OK.
#> Written data set to .$Data$Raw

# impute raw data set using population groups
# output to data frame directly
Impute(coin, dset = "Raw", f_i = "i_mean_grp",
               use_group = "Pop_group", out2 = "df")
#>    uCode      LPI   Flights      Ship Bord         Elec      Gas ConSpeed
#> 1    AUS 3.793385  36.05498 14.004198    0   0.00000000  1.14000 11.10000
#> 2    AUT 4.097985  29.01725  0.000000   35  35.36972983  0.27300 14.10000
#> 3    BEL 4.108538  31.88546 20.567121   48  26.53304667 36.10000 16.30000
#> 4    BGD 2.663902   4.27955  9.698165   16   1.33161667  0.14400 11.65000
#> 5    BGR 2.807685   9.23588  7.919366   18  11.27758417  0.31200 15.50000
#> 6    BRN 2.870492   2.01900  7.492593    2   0.00000000  6.04000 13.65455
#> 7    CHE 3.987158  51.78846  0.000000   41  68.77328717  3.05000 21.70000
#> 8    CHN 3.661104 114.20080 21.171976   32   6.43630583  9.46000  7.60000
#> 9    CYP 2.999061   8.75467 11.689495    0   0.43936433  0.02900  6.90000
#> 10   CZE 3.674309  15.30953  0.000000   35  46.75817867  2.70000 16.90000
#> 11   DEU 4.225967 174.35880 20.501262  105 110.17956283 48.70000 15.30000
#> 12   DNK 3.815794  32.77050 14.407080    3  20.10336500  0.41800 20.10000
#> 13   ESP 3.727412 170.96280 19.328835   26  24.17962333  3.29000 15.50000
#> 14   EST 3.363489   3.12946  9.171997    6   9.49907183  0.06670 11.60000
#> 15   FIN 3.920745  18.85806 10.044155   18  24.41426050  0.38000 20.50000
#> 16   FRA 3.900953  97.63489 19.536115   75  78.52593033 29.90000 10.80000
#> 17   GBR 4.069669 210.82440 20.800425   13  25.78370767 42.50000 16.90000
#> 18   GRC 3.239516  34.83849 15.679508   12   2.43086017  0.13900  7.90000
#> 19   HRV 3.160829   9.24529 12.440452   41  19.52836200  0.42200  8.60000
#> 20   HUN 3.428968  13.01196  0.000000   28  20.54324117  0.41900 14.80000
#> 21   IDN 2.984537  34.68020 12.209998    2   0.00000200 22.30000  7.20000
#> 22   IND 3.420043  25.26430 16.522118   35   1.33225167  0.75100  6.50000
#> 23   IRL 3.794886  34.17721 10.575193   12   3.39668933  2.17000 15.60000
#> 24   ITA 3.755414 110.27550 18.383778   24  49.32954433  4.22000  9.20000
#> 25   JPN 3.970464  69.00941 17.261338    0   0.00003600 34.50000 20.20000
#> 26   KAZ 2.751998   4.02303  0.000000   46   3.08950333 12.70000 14.74000
#> 27   KHM 2.800590   9.52120  9.017474   13   2.18452350  0.13500 14.74000
#> 28   KOR 3.717126  69.84827 20.427418    1   0.00003600 12.50000 28.60000
#> 29   LAO 2.067254   3.07440  0.000000   20   2.04784200  0.00841 16.68333
#> 30   LTU 3.631688   5.37919  9.234349   22   7.49402750  0.98000 14.60000
#> 31   LUX 4.219409   4.84458  0.000000   12   6.91123783  0.48200 11.60000
#> 32   LVA 3.327107   6.77976  7.850937   17   5.68129900  0.37700 16.60000
#> 33   MLT 3.069256   6.75251 17.060552    0   1.06719433  0.07190 12.80000
#> 34   MMR 2.458571   6.69500  9.182403    8   0.39678050 24.10000 14.74000
#> 35   MNG 2.506056   0.98951  0.000000    9   1.52714167  0.02670 13.65455
#> 36   MYS 3.426307  53.33988 20.551337    9   0.06733867 26.30000  8.90000
#> 37   NLD 4.187530  63.59241 20.541548   32  44.09012050 23.00000 17.40000
#> 38   NOR 3.732163  25.64994  9.287889   19  19.54137450 94.80000 23.50000
#> 39   NZL 3.388000  13.37242 11.910746    0   0.00000000  0.02260 14.70000
#> 40   PAK 2.923219   2.21146 15.319999   43   0.00301600  0.19500 11.65000
#> 41   PHL 2.856259  19.43838 11.621228    0   0.00000000  0.68300  5.50000
#> 42   POL 3.425877  33.79735 14.815517   62  26.34419950  3.68000 12.60000
#> 43   PRT 3.409367  40.46484 16.198871   11  10.12481567  0.57300 12.90000
#> 44   ROU 2.993120  18.79894 12.689838   24   8.26470100  0.37600 17.00000
#> 45   RUS 2.570864  34.06447 15.811485  122  14.18802800 19.80000 11.80000
#> 46   SGP 4.143632  67.86156 20.276872    2   0.00000200  9.43000 20.30000
#> 47   SVK 3.336895   2.07397  0.000000   25  18.81965283  4.63000 13.00000
#> 48   SVN 3.184508   1.51736 13.380177   20  21.65607267  0.44200 13.70000
#> 49   SWE 4.204593  31.74444 15.578093   18  42.47252133  1.69000 22.50000
#> 50   THA 3.255100  73.92221 14.506399   17   2.25995317 24.50000 16.00000
#> 51   VNM 2.976629  28.52418 16.548761   25   3.52419900  0.77600  9.50000
#>     Cov4G      Goods  Services    FDI     PRemit     ForPort Embs IGOs   UNVote
#> 1   94.00  288.48930 108.66450 20.900 14.7103856  2188.31100   82  196 38.46245
#> 2   98.00  278.42640 108.12730  5.000  5.0690118   808.68320   88  227 42.63920
#> 3   99.89  597.87230 216.31460  5.710 13.3545270  1574.30800   84  248 43.00308
#> 4   65.00   56.24166  10.07891  3.010  7.4693891     8.48896   52  145 38.60601
#> 5   56.73   42.82515  12.97674  1.350  1.0395414    15.50880   67  209 42.95986
#> 6   80.00    7.23391   2.11464  0.130  0.7604628  1642.16572   41   85 38.50109
#> 7   98.00  402.86490 207.36370 12.200  9.4893412  2615.08900   82  222 42.64127
#> 8   85.00 1713.61900 657.10900 75.600 26.5510247  1541.03500  100  193 37.13661
#> 9   60.00    8.76681  15.23712  1.230  0.4772705    40.76228   43  172 42.34705
#> 10  98.70  274.13650  43.46382  3.880  4.6915576   107.71030   84  201 42.22506
#> 11  95.70 1919.19400 578.42640 47.000 28.6815953  6386.91800  100  309 42.62615
#> 12  99.99  146.67710 113.67530  9.100  2.1877554  1021.27800   77  259 42.79140
#> 13  91.30  447.12290 197.19810 17.100 16.7522764  2040.57100   89  280 43.10103
#> 14 100.00   28.24110  10.22780  0.580  0.5888337    17.41899   46  194 42.87997
#> 15  99.90  101.57500  53.80751  6.030  1.5102145   747.62680   74  269 42.74629
#> 16  80.00  849.33030 471.29310 30.900 30.2099053  6745.32800  100  329 40.42295
#> 17  97.80  778.90520 518.22560 55.500 20.6965329  8206.97800  100  285 39.40118
#> 18  83.00   56.62702  38.17887  0.883  0.7630075   185.10480   83  216 42.69301
#> 19  98.00   28.36795  17.35676  0.387  1.5624119    16.88908   62  197 42.74966
#> 20  97.30  173.61590  39.11952  3.210  4.1655816    72.52570   79  212 42.53351
#> 21   5.00  222.41860  54.06682 19.300  4.4459418   287.61530   83  175 38.10477
#> 22   4.00  288.98060 294.28220 41.800 14.6034747   270.28240   95  198 36.92131
#> 23  90.00  139.99370 338.09850  6.100  1.9605859  6908.41200   74  195 42.68568
#> 24  93.00  658.19810 202.53980 10.300 16.2027497  3264.08700   93  288 42.99491
#> 25  99.00  732.20780 351.42530 37.100 10.5489456  7449.99300   95  201 42.17231
#> 26  65.50   55.04856  16.85995  4.990  2.5553953    87.49439   62  117 38.72687
#> 27  30.00   20.75014   5.79267  4.190  0.6288657  1857.95820   42   95 38.02232
#> 28  99.00  568.99200 200.84810 26.700  8.7110922  1195.63500   86  210 42.00012
#> 29   5.00    8.95527   1.37855  1.750  0.1662127   743.46552   41   82 37.63291
#> 30  91.00   42.12889  12.35732  0.965  1.1467629    31.03612   50  190 42.71283
#> 31  96.00   30.97279 165.79100  7.990  2.8993036 10601.75000   37  190 42.98426
#> 32  90.00   28.29194   7.25574  0.444  1.0374761    26.82834   48  184 42.70066
#> 33 100.00   13.27830  20.06847  0.179  0.2330044   139.86780   28  169 42.56485
#> 34   0.00   31.70398   6.24003  6.700  0.9065301     0.04805   52   87 35.75572
#> 35  90.00    7.81803   2.72198  2.100  0.3115324     5.20507   40  107 39.05257
#> 36  71.00  278.03190  72.93042 21.900  7.3896926   248.16150   74  177 38.28493
#> 37  99.00  770.39350 346.55110 13.900  4.8949538  4697.46400   89  265 42.80321
#> 38  99.00  142.60950  83.35802  4.570  2.2852030  1632.78100   78  259 43.11114
#> 39  88.00   48.20846  26.55097  1.850  2.3361618   235.98580   44  149 42.32222
#> 40  16.00   45.28752  11.00249  6.950  3.9638222    13.38957   72  157 38.14939
#> 41  39.00  118.56180  55.21572  6.130  8.2693569   103.68870   66  158 37.68160
#> 42 100.00  363.01320  82.74544 10.100  6.2945847   218.88300   87  238 42.58490
#> 43  94.30  102.49150  43.77949  2.330  5.2309644   327.18220   72  236 43.18605
#> 44  72.00  115.31850  31.05017  4.050  4.7341943    35.20750   75  217 42.52487
#> 45  50.00  343.85040 122.55080 17.000  5.5610250   304.70170   99  232 36.12970
#> 46 100.00  414.23890 304.71690 27.000  6.0574964  1487.02000   58  119 38.74750
#> 47  75.00  140.36600  16.24510  2.320  2.7675602    70.29841   62  201 43.10103
#> 48  97.70   54.98977  11.79091  0.362  0.7759290    49.05213   43  197 43.10103
#> 49  99.99  233.30670 132.10610  8.070  4.7452582  1463.55900   78  278 42.75153
#> 50  21.00  282.80140 108.01090 17.200  7.3177969   220.11210   78  152 38.82629
#> 51   0.00  269.07660  30.53244 24.900  5.0849807     0.00189   80  138 37.53063
#>    CostImpEx    Tariff      TBTs TIRcon RTAs Visa  StMob Research       Pat
#> 1      364.0  1.170000  205.0000      0   14   68 268.00    46761  229.8000
#> 2        0.0  1.600000 1144.0000      1   30   80  69.80    14432  519.1000
#> 3        0.0  1.600000 1348.0000      1   30   80  42.30    20176  655.8000
#> 4      595.0 10.530000  526.9091      0   12   45  50.40     2084  627.1600
#> 5       52.0  1.600000 1140.0000      1   30   79  28.80     1854   12.2000
#> 6      140.0  0.500000    2.0000      0   15   90   3.50      229   41.9250
#> 7      150.0  0.000000  300.0000      1   33   80  49.80    30056 1315.7000
#> 8      255.5  3.540000 1230.0000      1   17   11 445.00    95919  927.8000
#> 9      100.0  1.600000 1141.0000      1   30   79  29.40     1337    7.4000
#> 10       0.0  1.600000 1456.0000      1   30   79  47.90     9190  112.6000
#> 11      45.0  1.600000 1163.0000      1   30   82 233.00    78353 2771.7000
#> 12       0.0  1.600000 1393.0000      1   30   81  33.20    15986  306.0000
#> 13       0.0  1.600000 1212.0000      1   30   81  51.00    39777  334.7000
#> 14       0.0  1.600000 1153.0000      1   30   79   5.99     1594   14.4000
#> 15      70.0  1.600000 1215.0000      1   30   81  22.00    10303  412.5000
#> 16       0.0  1.600000 1385.0000      1   30   81 152.00    56677 1469.0000
#> 17      25.0  1.600000 1187.0000      1   30   81 326.00    96337 1313.7000
#> 18      30.0  1.600000 1140.0000      1   30   80  48.60     8020   43.4000
#> 19       0.0  1.600000 1179.0000      1   30   78   5.05     2342   15.1000
#> 20       0.0  1.600000 1173.0000      1   30   79  26.20     5180  109.5000
#> 21     303.2  2.640000  118.0000      1   17   59  31.10     2624   23.7000
#> 22     226.7  6.320000  117.0000      1   15   51 120.00    20234  437.6000
#> 23     150.0  1.600000 1143.0000      1   30   80  24.50     7451  140.6000
#> 24       0.0  1.600000 1171.0000      1   30   81  97.00    45825  513.0000
#> 25     161.0  1.350000  805.0000      0   14   84 133.00    31184  583.5000
#> 26     320.0  2.510000   19.0000      1    2   48  83.90     1026    3.6000
#> 27     220.0  9.770000    3.0000      0   15   61   4.43      378  398.4545
#> 28      38.0  7.680000  839.0000      1   46   85  83.80    20437  249.8000
#> 29     350.0  1.650000    1.0000      0   16   61   6.46      175  321.1083
#> 30      28.0  1.600000 1170.0000      1   30   79  12.10     1482    7.5000
#> 31       0.0  1.600000 1140.0000      1   30   80  12.70     1206   66.2000
#> 32      35.0  1.600000 1170.0000      1   30   79   8.79      794    1.5000
#> 33      25.0  1.600000 1140.0000      1   30   80   1.77      347    4.7000
#> 34     350.0  3.000833    2.0000      0   17   17   5.81      299  398.4545
#> 35     147.0  1.432500    7.0000      1    1   21   8.48      293    0.3000
#> 36     105.0  3.680000  236.0000      0   17   91 115.00     8080   64.2000
#> 37       0.0  1.600000 1754.0000      1   30   80  69.30    33445  641.2000
#> 38       0.0  1.020000   81.0000      1   31   81  22.60    11696  168.1000
#> 39     147.0  1.270000  108.0000      0   13   80  49.20     7731   46.5000
#> 40     992.0  9.990000  112.0000      1   11    1  30.30     7122    7.2000
#> 41     103.0  3.400000  256.0000      0   17   57  10.60     1361   11.3000
#> 42       0.0  1.600000 1147.0000      1   30   79  35.60    13008  179.3000
#> 43       0.0  1.600000 1141.0000      1   30   80  14.40    10943   46.1000
#> 44       0.0  1.600000 1230.0000      1   30   79  38.70     4173   42.6000
#> 45     244.5  3.430000   85.0000      1    2   17 135.00    16182  141.5000
#> 46      77.0  0.000000   57.0000      0   19   92  19.30    11411  270.5000
#> 47       0.0  1.600000 1187.0000      1   30   79  40.90     2741   44.2000
#> 48       0.0  1.600000 1250.0000      1   30   79   3.60     2653   30.8000
#> 49      40.0  1.600000 1364.0000      1   30   81  28.10    23514  661.5000
#> 50     140.0  4.296364  609.0000      0   17   61  30.30     5317   53.6000
#> 51     322.0  2.860000  114.0000      0   19   31  53.40     3618  627.1600
#>     CultServ CultGood Tourist MigStock        Lang       Renew  PrimEner
#> 1  2.0009800  6.80700   8.263  5.66849 19.00543746  9.18050296 123.01003
#> 2  1.5275800  8.93200  28.121  1.30365 14.19041597 34.39499175  84.92785
#> 3  2.3878700 12.69800   7.481  1.32919 10.69085182  9.20164053 113.76871
#> 4  0.0147200 22.26911   0.125  5.08139  0.17744048 34.74706901  74.74533
#> 5  0.1199100  0.88000   8.252  0.69462  6.28997761 17.65007793 151.98183
#> 6  1.1553375  0.36400   0.219  0.14041  6.24168794  0.01493504 113.44995
#> 7  1.1597600 28.96500   9.205  2.12634 13.63554873 25.29198368  53.47854
#> 8  2.8862400 74.46800  59.270  4.30982  0.73963574 12.41335257 175.31089
#> 9  0.1370000  0.52900   3.187  0.23838 12.32117982  9.94206602  77.69450
#> 10 0.3223000  8.80700   9.321  1.10637  7.72876772 14.82856195 134.44935
#> 11 4.8360300 47.16100  35.555 10.92850 15.26134955 14.20625270  86.76327
#> 12 1.9881600  4.91200  10.781  0.54405 19.26996939 33.17027717  63.75411
#> 13 1.5920175 11.75900  75.315  3.34468  5.15846746 16.25409774  79.00655
#> 14 0.1027500  0.74500   3.147  0.32117 12.21152796 27.47683347 169.38370
#> 15 0.5887800  1.85800   2.789  0.46894 15.04353335 43.23526259 159.24526
#> 16 7.0190500 41.02800  82.570  4.37339 11.50318182 13.49926232  97.46473
#> 17 9.5699600 35.13900  35.814  8.91445 19.35213020  8.71168557  72.59383
#> 18 0.4748300  1.62600  24.799  1.06705 10.59013987 17.17004755  88.19577
#> 19 0.2833100  0.73700  13.809  0.54069 11.97641492 33.12746664  94.25010
#> 20 1.5107100  2.61400   5.302  0.84562  5.22493581 15.55936205  95.79304
#> 21 0.1340500 22.26911  11.519  2.06821  0.03222059 36.87934810  88.36380
#> 22 3.2919800  7.99100  14.569  8.43759  3.77194295 36.02122257 118.26344
#> 23 0.5222000  3.42400  10.100  1.28606 19.46425530  9.08139901  56.06685
#> 24 0.5783200 26.84300  52.372  4.87039  6.40814649 16.51685058  71.12753
#> 25 2.2075400 16.18200  24.040  2.19471  0.03107851  6.29735708  92.99299
#> 26 0.0578000  0.98500   6.509  6.38381  7.20274577  1.55844291 188.00931
#> 27 0.0050100 14.11330   5.012  0.93047  4.41049248 64.92377591 133.44976
#> 28 1.7980000 14.11330  17.242  2.06535  2.13461064  2.70770280 158.23984
#> 29 0.8463708  7.01150   3.315  1.12532  0.16638354 59.31586075  99.50804
#> 30 0.0653200  1.28100   2.296  0.57490 10.50042321 28.96117925  90.93856
#> 31 8.0450000  0.63600   1.054  0.29738 21.48526056  9.03131366  73.25911
#> 32 0.0332000  0.73500   1.793  0.47182 12.00784247 38.09801717  97.98307
#> 33 2.4627200  0.36900   1.966  0.11826 16.91195826  5.35500475  55.99671
#> 34 0.0890500 14.11330   2.907  2.57501  0.01884848 61.52781165  77.95974
#> 35 0.0026600  0.04600   0.404  0.08170  2.25185464  3.42973729 161.97873
#> 36 1.1529200  7.55500  26.757  4.00744  6.66895073  5.19444259 122.65287
#> 37 2.4231700 19.15900  15.828  1.68457 18.15321190  5.88946308  94.71582
#> 38 1.6616300  2.98100   5.960  0.66093 15.09626505 57.77200160  88.23266
#> 39 0.3461500  1.21300   3.370  1.48606 16.68013129 30.78917555 132.29055
#> 40 0.0355300  1.25600   0.966  4.09286  1.71805798 46.47632492 105.86127
#> 41 0.2955500  3.18500   5.967  1.40403 10.89425114 27.45154445  72.31282
#> 42 1.4471400 11.91200  17.471  4.24078  9.10344746 11.91148821 101.58949
#> 43 0.5394600  2.61600  11.223  1.75075  6.93615852 27.15729839  78.17923
#> 44 0.1449000  2.38700  10.223  3.32536  7.05215979 23.69779403  80.93064
#> 45 1.4463300  8.37900  24.571  7.65393  5.92039782  3.30422835 192.45083
#> 46 0.9278000 14.50700  12.914  2.47645 12.57967365  0.70863530  63.77904
#> 47 0.0882000  2.40700   2.027  0.49825  8.23424298 13.40916822 107.86727
#> 48 0.2021100  1.21200   3.032  0.18037 14.10243000 20.87739614 113.88117
#> 49 0.9089600  6.01400   6.782  1.03933 18.16742472 53.24776980 112.44515
#> 50 0.0896900  6.66100  32.530  4.13663  0.15905946 22.86307013 132.60433
#> 51 2.2552382 22.26911  10.013  1.16007  0.08500231 34.99856984 130.35543
#>           CO2    MatCon     Forest    Poverty    Palma TertGrad FreePress
#> 1  15.3701378 38.381073  6.3295294  0.3000000 1.400000 29.78425        22
#> 2   6.8737132 15.763616  3.0382810  0.7000000 1.110000 13.08167        22
#> 3   8.3281599 15.884942  5.7098277  0.0000000 0.960000 31.70948        12
#> 4   0.4591420  2.577148  5.2605370 19.6000000 1.260000 14.60314        62
#> 5   5.8716159 18.704688  1.5483901  1.5000000 1.490000 24.47098        42
#> 6  22.1247012 23.331756  3.2269754  0.3363636 1.239000 25.99135        76
#> 7   4.3115630 13.520983  0.9916749  0.0000000 1.200000 36.94929        13
#> 8   7.5439076 23.647067  3.7251454  1.4000000 2.100000  3.57765        87
#> 9   5.2603520 24.426326  1.7662068  0.0000000 1.400000 25.54672        23
#> 10  9.1659784 17.115225  4.9847983  0.0000000 0.920000 19.34180        21
#> 11  8.8893704 15.015616  2.3703489  0.0000000 1.100000 24.74205        20
#> 12  5.9357125 16.651923  5.3043935  0.2000000 1.040000 30.38373        12
#> 13  5.0338245 11.998735  6.9265991  1.0000000 1.460000 29.29108        28
#> 14 14.8488192 32.980617  9.4062132  0.5000000 1.260000 37.60498        16
#> 15  8.6607212 24.605785  8.5039377  0.0000000 0.950000 22.50554        12
#> 16  4.5720882 11.827461  3.7879808  0.0000000 1.310000 17.66307        26
#> 17  6.4974405  8.495755  5.4662193  0.2000000 1.250000 29.33262        25
#> 18  6.1803373 11.624611  1.8997660  1.5000000 1.550000 22.92907        44
#> 19  3.9738049  9.791906  1.7280976  0.7000000 1.220000 18.25773        41
#> 20  4.2655750 16.923169  5.8471809  0.5000000 1.130000 20.67309        44
#> 21  1.8193633  7.190287 10.6347954  7.2000000 1.810000  8.48301        49
#> 22  1.7300004  5.337525  3.3552538 21.2000000 1.480000  9.13629        43
#> 23  7.3781178 13.938004  3.5608942  0.5000000 1.250000 26.83780        18
#> 24  5.2708668 10.904800  2.0543587  0.8100000 1.420000 14.35266        31
#> 25  9.5387061  9.381838  1.4232737  6.0545455 1.220000 29.87681        27
#> 26 14.3623897 28.212457  0.4801006  0.1000000 0.920000 22.91112        85
#> 27  0.4377600  4.882918 22.8067646  0.8100000 1.160000 22.91112        70
#> 28 11.5703454 15.904725  3.0383172  0.3000000 1.311818 24.35774        34
#> 29  0.2972009 10.606696 13.1990072 22.7000000 1.680000 23.22077        85
#> 30  4.3780901 14.803791  8.0974972  0.7000000 1.430000 33.09735        21
#> 31 17.3621214 28.154633  4.5446296  0.2000000 1.400000 34.27727        14
#> 32  3.4981929 16.002621 10.3812689  0.7000000 1.440000 27.79356        26
#> 33  5.4915248 16.261072  2.9263320  0.0000000 1.239000 13.28486        23
#> 34  0.4166004  3.300184  6.3602604  6.4000000 1.311818 22.91112        73
#> 35  7.1273263 33.493893  2.9419658  0.2000000 1.230000 23.71332        37
#> 36  8.0329916 18.856906 17.2735413  0.8100000 2.620000 16.36954        69
#> 37  9.9201381 14.304186  1.8284548  0.0000000 0.990000 28.86907        11
#> 38  9.2709451 21.150196  3.1175512  0.2000000 0.880000 26.65009         8
#> 39  7.6865758 24.861794  6.0694910  0.3363636 1.239000 26.00903        19
#> 40  0.8962641  4.432336  0.3263907  6.1000000 1.180000  8.75331        65
#> 41  1.0554568  3.972959  4.4737686  8.3000000 2.170000 16.99506        44
#> 42  7.5171516 17.682962  5.8058431  0.0000000 1.230000 23.70020        34
#> 43  4.3315540 11.090858 31.8455434  0.5000000 1.500000 18.18253        17
#> 44  3.5161537 11.469474  2.4348105  0.0000000 0.960000 13.01408        38
#> 45 11.8575278 16.362004  5.3007501  0.0000000 2.020000  2.00915        83
#> 46 10.3063319 33.369013  5.9836906  2.4000000 1.198333 28.21053        67
#> 47  5.6615813 10.910721  5.0249404  0.7000000 0.880000 18.92215        26
#> 48  6.2136868 13.770686  2.0597113  0.0000000 0.880000 18.82353        23
#> 49  4.4781822 17.027679  8.5016067  0.5000000 0.930000 22.99885        11
#> 50  4.6218600 12.304692  6.7611565  0.0000000 1.650000 13.12545        77
#> 51  1.8035657 13.594893 12.7836337  2.6000000 1.640000 14.60314        84
#>      TolMin NGOs CPI    FemLab WomParl PubDebt  PrivDebt     GDPGrow    RDExp
#> 1  3.600000  311  77 0.8592661 28.6667  37.640 202.50016  0.34888036 2.202070
#> 2  4.800000  301  75 0.8872138 30.6011  86.190 141.28513  2.18677558 3.071810
#> 3  4.600000 1824  75 0.8699724 38.0000 106.050 225.72427  1.36616464 2.456680
#> 4  8.400000   16  28 0.5414029 20.2857  31.670  40.81502  6.16478747 1.196272
#> 5  5.100000   28  43 0.8927631 19.1667  26.300 116.98938  4.32022261 0.956570
#> 6  5.600000    1  62 0.8618006  9.0909   2.810 189.43663  0.02851029 1.124665
#> 7  3.600000  741  85 0.8936418 32.5000  45.660 237.77122 -0.01982295 2.966350
#> 8  7.600000  117  41 0.8359555 23.7030  42.920 193.43419  6.30396712 2.065580
#> 9  6.000000   19  57 0.8633334 17.8571 108.870 345.59967  0.00000000 0.455850
#> 10 5.100000   55  57 0.8119483 20.0000  40.310  73.21357  4.04300124 1.948650
#> 11 4.900000  986  81 0.8844910 36.9841  70.990 105.91991  1.79471020 2.877490
#> 12 4.400000  208  88 0.9270000 37.4302  45.530 223.23741  1.50309097 3.013870
#> 13 5.800000  341  57 0.8631487 39.1429  99.260 165.79129  2.85707386 1.219610
#> 14 7.536316   21  71 0.9000751 26.7327   9.740 126.58231  4.87884628 1.495020
#> 15 1.500000  118  85 0.9651910 42.0000  62.510 181.23815  2.33629470 2.904740
#> 16 7.000000 1071  70 0.8953486 25.8232  96.140 188.68200  1.42667764 2.231350
#> 17 6.400000 1582  82 0.8697419 30.0000  88.980 169.14574  1.12929130 1.703040
#> 18 5.100000  102  48 0.7784910 18.3333 176.940 124.65858  1.49779228 0.956730
#> 19 5.500000   30  49 0.8664952 19.8675  86.670 130.34435  3.99021292 0.854390
#> 20 4.500000   62  45 0.8249007 10.0503  75.330  92.51395  4.33844641 1.377620
#> 21 7.200000   32  37 0.6149829 19.8214  27.300  40.83840  3.92307260 0.084660
#> 22 8.300000  167  40 0.3455764 11.8081  69.070  55.03717  5.42924312 0.627400
#> 23 1.100000   64  74 0.8078358 22.1519  78.680 299.06965  6.49733804 1.513680
#> 24 4.800000  498  50 0.7364464 30.9524 132.710 115.32313  1.62982757 1.334880
#> 25 3.400000  252  73 0.7796105  9.2632 247.980 158.42065  1.88001976 3.283630
#> 26 7.900000    5  31 0.9010363 27.1028  21.890  52.65279  2.59552272 0.169440
#> 27 6.600000    0  21 0.8788125 20.3252  32.540  68.15849  5.19299957 0.118270
#> 28 2.600000  145  54 0.7311271 17.0000  37.890 193.24990  2.62122194 4.228160
#> 29 6.406549    1  29 1.0274716 27.5168  61.860  19.86313  5.33713473 2.092836
#> 30 4.100000   16  59 0.9398145 21.2766  42.780  63.30250  5.31639215 1.042460
#> 31 2.800000   66  82 0.8341093 28.3333  21.450 421.38527 -0.67739873 1.287730
#> 32 8.300000   18  58 0.9234106 16.0000  34.940  96.90818  5.56194830 0.625500
#> 33 3.600000   14  56 0.6323963 12.5000  63.960 190.06811  4.14990811 0.769230
#> 34 9.800000    1  30 0.8208780 10.1617  34.340  21.86631  5.40145516 1.563575
#> 35 3.500000    3  36 0.8351940 17.1053  49.245  85.61135  4.22356684 0.155010
#> 36 6.200000  113  47 0.6499864 10.3604  57.390 145.18617  4.43836861 1.298130
#> 37 4.500000  731  82 0.8748585 38.0000  65.120 231.32965  2.54478724 2.013290
#> 38 3.400000  160  85 0.9480041 39.6450  27.940 252.12094  0.99831301 1.933010
#> 39 3.300000   54  89 0.8854174 34.1667  29.950 174.09862  0.86445133 1.152360
#> 40 9.700000   25  32 0.2970086 20.5882  63.570  19.67393  3.65519604 0.245540
#> 41 8.200000  104  34 0.6490328 29.4521  34.790  56.33445  5.05974739 0.138390
#> 42 5.900000   50  60 0.8201792 28.0435  51.280  86.22427  4.53454572 1.003370
#> 43 2.200000   81  63 0.9104053 34.7826 128.980 184.73320  2.99637372 1.278850
#> 44 6.500000   30  48 0.7703541 20.6687  39.300  28.38030  7.57933150 0.487650
#> 45 8.500000   82  29 0.8649159 15.7778  16.420  70.67039  0.00000000 1.132020
#> 46 2.300000  139  84 0.7977098 23.7624 104.680 165.48938  3.52678166 2.197540
#> 47 6.600000   24  50 0.8132671 20.0000  52.910  92.63818  3.22730973 1.178450
#> 48 4.500000   31  61 0.9055214 36.6667  83.150  88.14863  4.91413516 2.211740
#> 49 1.800000  299  84 0.9490853 43.5530  43.400 207.22266  0.81838277 3.262850
#> 50 8.200000   98  37 0.8148830  4.8583  42.720 130.82868  3.64110272 0.627200
#> 51 5.700000    8  35 0.9194402 26.7206  58.250 123.81487  5.72587785 0.374040
#>        NEET
#> 1   8.70000
#> 2   6.50000
#> 3   9.30000
#> 4  27.40000
#> 5  15.30000
#> 6  17.20000
#> 7   6.50000
#> 8  16.09091
#> 9  16.10000
#> 10  6.30000
#> 11  6.30000
#> 12  7.00000
#> 13 13.30000
#> 14  9.40000
#> 15  9.40000
#> 16 11.50000
#> 17 10.30000
#> 18 15.30000
#> 19 15.40000
#> 20 11.00000
#> 21 21.50000
#> 22 27.90000
#> 23 10.90000
#> 24 20.00000
#> 25  3.50000
#> 26  9.50000
#> 27 12.70000
#> 28 11.99167
#> 29 42.10000
#> 30  9.20000
#> 31  5.90000
#> 32 10.30000
#> 33  8.00000
#> 34 17.40000
#> 35 19.80000
#> 36 12.80000
#> 37  4.00000
#> 38  4.60000
#> 39 11.80000
#> 40 30.40000
#> 41 21.70000
#> 42  9.50000
#> 43  9.30000
#> 44 15.20000
#> 45 12.40000
#> 46  4.00000
#> 47 12.10000
#> 48  6.50000
#> 49  6.20000
#> 50 15.00000
#> 51  0.60000