In a wide range of analyses, there is a common problem. The data is usually not available at the desired spatial scale that researchers need. Ecological inference allows us to recover incomplete or unavailable data by inferring individual behaviours based on the aggregated information. In some cases, the database containing the variable of interest does not have it at the needed spatial level. Entropy allows us to obtain the best solution according to the information that we have. To learn more about the methodology, see Fernández-Vázquez et al. (2020)
The package extrapolates the value of the variable of interest above a data frame with more detailed geographical information, being consistent with the aggregates available. This package contains two functions, ei_gce() and ei_gme(). The method that the function ei_gce() applies is framed between GCE (Generalized Cross entropy), minimising the distance between the two distributions P and Q, being this Q the prior information we can initially have. If the user does not have prior information can choose ei_gme() for computational reasons which will use GME (Generalized maximum entropy) since our distribution a priori will be the uniform distribution. These two kinds of problems will be explained in the next sections.
The EIentropy package makes the process of assessing uncertainty to estimate information at the desired level of disaggregation into one function. It gathers all the steps making it easy to apply this methodology to problems of absence of data. This document introduces you to the functions ei_gme() and ei_gce(), which apply entropy to solve issues of ecological inference, providing, consistent disaggregated indicators with observable aggregated data and cross moments.
Once you’ve installed it, the vignette (“EIEntropy”) will allow you to learn more. We will use the data included in this package to explore its functions.
This package is on CRAN and can be installed from within R.
The problem assessed is the need to obtain a variable Y at a spatial level that is not available. This variable Y can take J values. The method aims to obtain a matrix P with dimension n x J being n the number of observations. Matrix P is compounded by the probabilities associated with each j value for each observation. Taking advantage of the information that we have, the method introduces the cross-moments as a restriction to assure consistency.
Taking into account Y is the sum of P and U, being U the random noise. Once we have estimated matrix P and the error term, we can obtain Y as Y = P + U. The error term is built as a weighted mean of a support vector V in which weights W are estimated.
The support vector is the component of the noise defining the flexibility of the estimation. It represents the maximum and minimum error around a value in the center. By default, V is defined as (var, 0, -var) where var represents the variance of the dependent variable. If the estimation requires more flexibility V can be defined wider–with (1,0,-1) as the recommended maximum.
We present two functions to apply ecological inference through entropy. The general case minimizes the Kullback-Leibler divergence to find the matrix of probabilities P with the minimum divergence with a prior. This case is adequate even when we have prior information on the distribution of the probabilities of our variable of interest. This information refers to all existing knowledge previous to the data that can influence the expectations of the variable of interest.
$$\min_{P} \, \text{KL}(P, Q) = \sum_{i=1}^{n} \sum_{j=1}^{J} p_{ij} \log\left(\frac{p_{ij}}{q_{ij}}\right)+ \sum_{l=1}^{L} \sum_{i=1}^{n} \sum_{j=1}^{J} w_{ijl} \log\left(\frac{w_{ijl}}{wo_{ijl}}\right)\quad \text{s.t.}$$
$$ \frac{1}{n} \sum_{i=1}^{n} x_{s_{ik}} y_{ij} = \frac{1}{n} \sum_{i=1}^{n} x_{c_{ik}} (p_{ij} + u_{ij}) =\frac{1}{n} \sum_{i=1}^{n} x_{cik} [p_{ij} + w_{Lij} v_{l}]; j=1,\ldots,J \] $$ $$\[ \sum_{j=1}^{J} p_{ij} = 1 \quad \text{for } i=1,\ldots,n \] $$ $$\[ \sum_{l=1}^{L} w_{Lij} = 1 \quad \text{for } i=1,\ldots,n; j=1,\ldots,J \] $$
This function minimizes the distance between P and Q. Being Q the prior information that we already have. If we have some information about the possible distribution of our variable of interest we can include this information here. For example, if you know your variable of interest can take two values but one of them is more common than the other you can include it in your estimation by using Q.
If we don’t have any information then we will assume there is the same probability for each possibility j of our variable of interest. In this sense, we minimize the divergence with a uniform distribution.
Solving the optimization problem, we obtain estimations as Ŷ = P̂ + ŴV. The solution should be consistent with the restrictions. In this case, the restrictions will contain information from two data sources, datahp and datahs. If there were divergences between the two sources of data, they would be captured in the error term. This is one of the main advantages of the methodology because it allows the user to use two databases with divergences between them.
To explore the functions we will use data included in the package. In our example, we want to obtain microdata about poverty, in terms of wealth, with an indication of location at regional level. We have the variable of interest in one official database but without information about location. At the same time, in other database, the variable of interest is not available but the household location is.
The data can be loaded by calling the functions financial() and social().
In this example, we aim to obtain probabilities of being poor in terms of wealth for each individual or observation in the survey with detailed information about location. With this procedure, we will have our variable of interest at the desired spatial scale. As it is known, some variables, such as education level, income, or employment status are related to wealth. Hence, we will use these variables as regressors in the example. These variables are going to be our X. We have the same variables in both data frames with the same name. For this example, the financial survey includes 100 observations for the variables Dcollege, Dunemp, total income and the variable of interest: poor_liq. They are a dummy for college, a dummy for being unemployed, the household income (in euros) and a dummy for being poor in terms of liquid assets respectively.
The data called social has the same variables but instead of the variable of interest, it has another variable with the region of each household. In this database, we have 200 observations (households).
The function ei_gce() allows the user to introduce prior information in the estimation. In this example, we keep using the databases included in this package financial and social. Once we have chosen the best function for our case note that we need to specify our function :
Note that the same name in both datasets for the independent variables is required.
This function’s arguments are the previously defined function, the databases used, the weights, the tolerance, the maximum number of iterations allowed and the support vector. With this function, weights can be used and included with weights. If there are no weights the function assumes a matrix of 1. Note that the weights used in this methodology are normalised so analytics and sampling weights can be used without distinction.
In this example the variable of interest (poor_liq) is defined with a function in the argument fn (see previous section)
The arguments corresponding to the information a priori and the support vector can be included as :
In this example we assume a priori distribution of poverty equal to 0.4 for poor and 0.6 for non-poor. The support vector has been set to the maximum (1,0,-1). Applying the ei_gce() we can solve the estimation as:
## $estimations
## weights predictions_1 predictions_0 p_dual_1 p_dual_0 e_dual_1
## 1 6.408614e-03 0.3575529 1.03035531 0.3533453 0.6466547 4.207600e-03
## 2 4.069074e-03 0.4579585 0.91127758 0.4010201 0.5989799 5.693835e-02
## 3 8.478890e-05 0.4980404 0.49778909 0.5000539 0.4999461 -2.013444e-03
## 4 6.019554e-03 0.2913950 0.73681840 0.4048727 0.5951273 -1.134777e-01
## 5 8.529959e-03 0.2570936 0.34752226 0.4801269 0.5198731 -2.230333e-01
## 6 3.466777e-03 0.4219567 0.52532582 0.4778437 0.5221563 -5.588704e-02
## 7 7.143169e-03 0.3431462 0.56578211 0.4522699 0.5477301 -1.091237e-01
## 8 6.728993e-03 0.3636107 1.09291525 0.3396642 0.6603358 2.394653e-02
## 9 9.459067e-03 0.1850652 0.90009340 0.3479844 0.6520156 -1.629192e-01
## 10 1.952733e-03 0.4375274 0.53932941 0.4781874 0.5218126 -4.065995e-02
## 11 6.884772e-03 0.3409616 1.04467668 0.3467600 0.6532400 -5.798477e-03
## 12 1.046638e-03 0.4666128 0.46897415 0.4994937 0.5005063 -3.288084e-02
## 13 6.632154e-03 0.4399613 0.88538227 0.4032222 0.5967778 3.673911e-02
## 14 5.694566e-03 0.3141421 0.76872110 0.4028355 0.5971645 -8.869346e-02
## 15 8.199805e-03 0.3571763 0.46767551 0.4762093 0.5237907 -1.190331e-01
## 16 7.974757e-03 0.2816642 0.79319558 0.3907911 0.6092089 -1.091269e-01
## 17 1.016052e-05 0.4998977 0.50057350 0.4998552 0.5001448 4.250031e-05
## 18 1.077733e-03 0.4830352 0.50320499 0.4956778 0.5043222 -1.264258e-02
## 19 4.555596e-03 0.4076707 0.92290286 0.3881158 0.6118842 1.955487e-02
## 20 1.797040e-03 0.4339845 0.50252953 0.4853035 0.5146965 -5.131899e-02
## 21 7.726297e-03 0.2935406 0.17974856 0.5255118 0.4744882 -2.319712e-01
## 22 7.537852e-03 0.4341515 1.22718192 0.3188256 0.6811744 1.153259e-01
## 23 5.078895e-04 0.4841946 0.52781386 0.4906531 0.5093469 -6.458534e-03
## 24 8.673474e-03 0.3593059 1.13535515 0.3285121 0.6714879 3.079385e-02
## 25 6.743411e-03 0.2907658 0.31328671 0.4950497 0.5049503 -2.042839e-01
## 26 2.597985e-03 0.4125180 0.40418162 0.5017961 0.4982039 -8.927805e-02
## 27 7.946911e-03 0.2515483 0.90304051 0.3608937 0.6391063 -1.093455e-01
## 28 3.132542e-03 0.4258019 0.50837696 0.4822951 0.5177049 -5.649326e-02
## 29 1.413325e-03 0.4676132 0.62261814 0.4667551 0.5332449 8.581649e-04
## 30 1.952905e-03 0.4791886 0.60540294 0.4729304 0.5270696 6.258114e-03
## 31 7.786354e-03 0.3123513 1.07949941 0.3330677 0.6669323 -2.071634e-02
## 32 6.412179e-03 0.3224583 0.21187503 0.5245444 0.4754556 -2.020861e-01
## 33 8.813903e-03 0.1744411 0.47787052 0.4337934 0.5662066 -2.593523e-01
## 34 3.104395e-03 0.3929576 0.53148299 0.4702987 0.5297013 -7.734104e-02
## 35 1.494452e-03 0.4658449 0.62994654 0.4648000 0.5352000 1.044982e-03
## 36 1.979537e-03 0.4596092 0.53104697 0.4846930 0.5153070 -2.508389e-02
## 37 1.781772e-03 0.4629720 0.46984859 0.4985254 0.5014746 -3.555338e-02
## 38 8.631740e-04 0.4799027 0.54706088 0.4856084 0.5143916 -5.705702e-03
## 39 2.624354e-03 0.4338919 0.62277842 0.4595287 0.5404713 -2.563679e-02
## 40 7.278409e-03 0.3458576 1.11245751 0.3315672 0.6684328 1.429038e-02
## 41 9.198636e-03 0.2555792 0.40702125 0.4669569 0.5330431 -2.113777e-01
## 42 8.939710e-04 0.4668206 0.52781825 0.4869299 0.5130701 -2.010927e-02
## 43 5.755561e-03 0.3821616 0.40800275 0.4944232 0.5055768 -1.122616e-01
## 44 9.197598e-03 0.2856064 0.24177718 0.5097401 0.4902599 -2.241337e-01
## 45 7.835590e-03 0.2200148 0.76804886 0.3831829 0.6168171 -1.631681e-01
## 46 7.304276e-03 0.3432004 1.10800671 0.3321399 0.6678601 1.106050e-02
## 47 2.825585e-03 0.4205479 0.59973606 0.4616216 0.5383784 -4.107370e-02
## 48 5.701607e-03 0.3381367 0.22895736 0.5241154 0.4758846 -1.859787e-01
## 49 9.403839e-03 0.1950073 0.65400027 0.4016438 0.5983562 -2.066365e-01
## 50 8.874280e-03 0.1537330 0.68043562 0.3871797 0.6128203 -2.334467e-01
## 51 5.856153e-03 0.3426623 0.25676738 0.5188898 0.4811102 -1.762275e-01
## 52 7.506319e-04 0.4913477 0.53804405 0.4899926 0.5100074 1.355092e-03
## 53 2.829871e-03 0.4666364 0.77707485 0.4329467 0.5670533 3.368972e-02
## 54 1.403796e-03 0.4635638 0.49129089 0.4940566 0.5059434 -3.049279e-02
## 55 2.256222e-03 0.4578912 0.66298076 0.4559810 0.5440190 1.910172e-03
## 56 8.706739e-03 0.2877420 1.12679437 0.3171980 0.6828020 -2.945600e-02
## 57 6.495227e-04 0.4948178 0.54199819 0.4898881 0.5101119 4.929705e-03
## 58 7.423215e-03 0.4258442 0.68832847 0.4437029 0.5562971 -1.785870e-02
## 59 9.409367e-03 0.1696855 0.54761923 0.4181584 0.5818416 -2.484729e-01
## 60 3.467645e-03 0.4281809 0.82286327 0.4147862 0.5852138 1.339475e-02
## 61 4.891585e-03 0.3094782 0.61218077 0.4351751 0.5648249 -1.256968e-01
## 62 5.191919e-05 0.4985833 0.50362845 0.4989189 0.5010811 -3.356238e-04
## 63 6.960881e-04 0.4903666 0.58538986 0.4796223 0.5203777 1.074432e-02
## 64 3.234067e-03 0.4538027 0.52812847 0.4840737 0.5159263 -3.027108e-02
## 65 8.095405e-03 0.4292160 1.26609141 0.3074113 0.6925887 1.218047e-01
## 66 2.123864e-03 0.4419034 0.47499073 0.4929021 0.5070979 -5.099873e-02
## 67 3.309518e-03 0.4220628 0.51060734 0.4810149 0.5189851 -5.895213e-02
## 68 5.300329e-03 0.4246752 0.70986982 0.4387951 0.5612049 -1.411988e-02
## 69 7.890242e-03 0.3960628 0.83750670 0.4048858 0.5951142 -8.822979e-03
## 70 5.248723e-03 0.4226222 0.69722224 0.4410983 0.5589017 -1.847615e-02
## 71 9.625057e-04 0.4846789 0.53212961 0.4898319 0.5101681 -5.153011e-03
## 72 3.609097e-03 0.4625682 0.86757745 0.4119065 0.5880935 5.066161e-02
## 73 5.617329e-03 0.3577380 0.30144701 0.5122907 0.4877093 -1.545528e-01
## 74 9.237887e-03 0.2252319 0.28192336 0.4873609 0.5126391 -2.621291e-01
## 75 9.275353e-03 0.1791909 0.84931095 0.3575241 0.6424759 -1.783332e-01
## 76 7.561670e-04 0.4805848 0.55759372 0.4834959 0.5165041 -2.911156e-03
## 77 1.374263e-03 0.4608683 0.58938189 0.4724582 0.5275418 -1.158981e-02
## 78 2.232129e-03 0.4092009 0.53765948 0.4724686 0.5275314 -6.326770e-02
## 79 7.759625e-03 0.2197842 0.75433479 0.3860175 0.6139825 -1.662333e-01
## 80 3.268253e-03 0.4049686 0.33721202 0.5146747 0.4853253 -1.097062e-01
## 81 5.423895e-03 0.3908737 0.42116173 0.4934728 0.5065272 -1.025991e-01
## 82 3.519797e-03 0.4011023 0.73079072 0.4292882 0.5707118 -2.818593e-02
## 83 3.686690e-03 0.4218566 0.83555868 0.4106558 0.5893442 1.120087e-02
## 84 8.770650e-03 0.3581336 1.14214132 0.3266198 0.6733802 3.151379e-02
## 85 4.499834e-03 0.3443989 0.31503811 0.5064108 0.4935892 -1.620119e-01
## 86 6.913635e-03 0.4258167 0.65587542 0.4506944 0.5493056 -2.487767e-02
## 87 7.423989e-03 0.3099141 0.82357517 0.3901214 0.6098786 -8.020731e-02
## 88 9.184997e-03 0.3684764 1.21182672 0.3109395 0.6890605 5.753690e-02
## 89 9.934938e-04 0.4868356 0.62392292 0.4705757 0.5294243 1.625986e-02
## 90 7.108557e-03 0.4118898 0.61412264 0.4566907 0.5433093 -4.480091e-02
## 91 6.307975e-03 0.3930564 1.12477321 0.3374866 0.6625134 5.556981e-02
## 92 5.444530e-03 0.4341244 1.13301054 0.3432290 0.6567710 9.089543e-02
## 93 5.708904e-03 0.3478416 0.89381629 0.3824980 0.6175020 -3.465645e-02
## 94 7.141561e-03 0.2905477 0.35111313 0.4867496 0.5132504 -1.962019e-01
## 95 7.903713e-03 0.2139224 0.51056251 0.4357452 0.5642548 -2.218228e-01
## 96 5.645807e-03 0.3900043 1.02568098 0.3608053 0.6391947 2.919899e-02
## 97 3.539554e-03 0.4426765 0.78565031 0.4260337 0.5739663 1.664282e-02
## 98 2.396317e-03 0.4714752 0.73488553 0.4432337 0.5567663 2.824150e-02
## 99 3.785424e-03 0.3795824 0.38732481 0.4983263 0.5016737 -1.187439e-01
## 100 6.899727e-03 0.3066195 0.73935628 0.4075441 0.5924559 -1.009246e-01
## 101 1.963958e-03 0.4265032 0.49737141 0.4848011 0.5151989 -5.829796e-02
## 102 4.301069e-03 0.4530187 0.59420200 0.4697461 0.5302539 -1.672744e-02
## 103 8.824290e-03 0.2297311 -0.00600991 0.5558381 0.4441619 -3.261069e-01
## 104 9.245072e-03 0.3264854 1.29020432 0.2829568 0.7170432 4.352858e-02
## 105 7.604964e-03 0.2918822 0.40191763 0.4760656 0.5239344 -1.841834e-01
## 106 7.759268e-04 0.4705220 0.49732782 0.4942550 0.5057450 -2.373305e-02
## 107 6.426895e-03 0.4035626 0.53715873 0.4713650 0.5286350 -6.780241e-02
## 108 5.150249e-03 0.3680239 0.31226925 0.5121460 0.4878540 -1.441221e-01
## 109 5.158771e-03 0.3572536 0.68868816 0.4290909 0.5709091 -7.183732e-02
## 110 7.247160e-03 0.4366023 0.71837996 0.4394684 0.5605316 -2.866135e-03
## 111 7.664692e-03 0.2662707 0.30129632 0.4922628 0.5077372 -2.259921e-01
## 112 4.033598e-03 0.3604464 0.66287701 0.4352917 0.5647083 -7.484528e-02
## 113 8.610544e-03 0.2296532 0.23937375 0.4978186 0.5021814 -2.681654e-01
## 114 9.173485e-03 0.2011518 0.91364398 0.3483646 0.6516354 -1.472128e-01
## 115 2.312141e-03 0.4580485 0.67159450 0.4541525 0.5458475 3.895999e-03
## 116 5.785912e-03 0.4354567 1.04645532 0.3647918 0.6352082 7.066491e-02
## 117 3.133029e-03 0.4449077 0.73761547 0.4370324 0.5629676 7.875294e-03
## 118 3.027803e-04 0.4943845 0.50697314 0.4973024 0.5026976 -2.917965e-03
## 119 6.494774e-04 0.4813709 0.48900016 0.4983649 0.5016351 -1.699403e-02
## 120 2.627321e-03 0.4582145 0.71701929 0.4443312 0.5556688 1.388325e-02
## 121 6.300118e-03 0.3465760 0.97917269 0.3630121 0.6369879 -1.643610e-02
## 122 5.009005e-03 0.4261547 0.53435546 0.4768131 0.5231869 -5.065832e-02
## 123 8.546357e-03 0.2830230 0.87443956 0.3735353 0.6264647 -9.051237e-02
## 124 5.935042e-03 0.4100825 1.12623889 0.3403531 0.6596469 6.972946e-02
## 125 5.670056e-05 0.4987561 0.50339404 0.4990062 0.5009938 -2.500707e-04
## 126 1.956694e-04 0.4944252 0.51274589 0.4960741 0.5039259 -1.648898e-03
## 127 3.491569e-03 0.4206538 0.52255350 0.4781570 0.5218430 -5.750318e-02
## 128 6.018842e-03 0.3018051 0.59415171 0.4373386 0.5626614 -1.355335e-01
## 129 2.453778e-03 0.4191594 0.61602633 0.4578344 0.5421656 -3.867505e-02
## 130 3.330195e-03 0.4159693 0.65473492 0.4488458 0.5511542 -3.287646e-02
## 131 4.568058e-04 0.4897739 0.52653218 0.4921231 0.5078769 -2.349181e-03
## 132 1.878873e-03 0.4594599 0.61469855 0.4667192 0.5332808 -7.259238e-03
## 133 7.274750e-03 0.3133444 1.01181033 0.3489821 0.6510179 -3.563774e-02
## 134 8.055270e-03 0.2281101 0.59283789 0.4216196 0.5783804 -1.935095e-01
## 135 7.918719e-03 0.3609859 0.70923352 0.4254748 0.5745252 -6.448891e-02
## 136 1.613960e-03 0.4448348 0.56875674 0.4734516 0.5265484 -2.861684e-02
## 137 4.043005e-03 0.4019309 0.70224165 0.4356366 0.5643634 -3.370567e-02
## 138 2.836492e-03 0.4275994 0.48698201 0.4872610 0.5127390 -5.966163e-02
## 139 8.648536e-03 0.3718296 0.81616112 0.4045683 0.5954317 -3.273870e-02
## 140 7.121030e-03 0.3625358 0.96901121 0.3685135 0.6314865 -5.977651e-03
## 141 7.015624e-03 0.4538467 0.76906468 0.4320253 0.5679747 2.182137e-02
## 142 2.042604e-03 0.4605752 0.54091166 0.4827870 0.5172130 -2.221182e-02
## 143 7.276373e-03 0.2817443 0.32781445 0.4898809 0.5101191 -2.081365e-01
## 144 8.504937e-03 0.4043297 1.38999062 0.2677250 0.7322750 1.366047e-01
## 145 9.535921e-03 0.3816151 0.92709379 0.3818853 0.6181147 -2.702406e-04
## 146 8.545091e-03 0.2113708 0.15552943 0.5127836 0.4872164 -3.014129e-01
## 147 2.254398e-03 0.4172127 0.50313127 0.4815725 0.5184275 -6.435976e-02
## 148 5.514651e-03 0.3174289 0.58313547 0.4430424 0.5569576 -1.256136e-01
## 149 6.254560e-03 0.3712000 1.05174495 0.3509693 0.6490307 2.023067e-02
## 150 6.128050e-03 0.4347501 0.64036291 0.4559327 0.5440673 -2.118256e-02
## 151 1.952048e-03 0.4280647 0.50181151 0.4841861 0.5158139 -5.612141e-02
## 152 8.239200e-03 0.3517008 0.70331437 0.4247808 0.5752192 -7.308004e-02
## 153 4.212187e-03 0.3515106 0.31600127 0.5077464 0.4922536 -1.562358e-01
## 154 6.562633e-03 0.2743976 0.22852289 0.5102348 0.4897652 -2.358372e-01
## 155 8.529452e-05 0.4988950 0.50384451 0.4989394 0.5010606 -4.435972e-05
## 156 4.627415e-03 0.3572116 0.37883525 0.4953140 0.5046860 -1.381024e-01
## 157 7.506022e-03 0.2258758 0.73509945 0.3913517 0.6086483 -1.654759e-01
## 158 5.802968e-03 0.3326783 0.21378770 0.5263388 0.4736612 -1.936605e-01
## 159 8.889093e-03 0.1840713 0.53123535 0.4247793 0.5752207 -2.407080e-01
## 160 3.338891e-03 0.4122694 0.37061400 0.5089940 0.4910060 -9.672460e-02
## 161 5.739428e-03 0.3218069 0.34309822 0.4953539 0.5046461 -1.735470e-01
## 162 9.051019e-03 0.1962323 0.87674376 0.3552434 0.6447566 -1.590110e-01
## 163 7.187216e-03 0.4262288 0.88441285 0.4006216 0.5993784 2.560716e-02
## 164 2.371262e-03 0.4263674 0.36367919 0.5135281 0.4864719 -8.716064e-02
## 165 5.791201e-03 0.3278009 0.66440013 0.4280142 0.5719858 -1.002133e-01
## 166 5.959915e-03 0.3356347 0.89016181 0.3808226 0.6191774 -4.518790e-02
## 167 8.379680e-03 0.2497505 0.72702560 0.3981276 0.6018724 -1.483771e-01
## 168 8.564844e-03 0.2985353 0.25356496 0.5099562 0.4900438 -2.114209e-01
## 169 1.064177e-03 0.4879185 0.55464122 0.4856992 0.5143008 2.219255e-03
## 170 6.110630e-03 0.2906057 0.56232070 0.4416470 0.5583530 -1.510413e-01
## 171 1.771706e-03 0.4904742 0.57754032 0.4813316 0.5186684 9.142649e-03
## 172 3.746941e-03 0.4465673 0.53292064 0.4814969 0.5185031 -3.492955e-02
## 173 8.344937e-03 0.3299483 0.62833628 0.4361416 0.5638584 -1.061933e-01
## 174 8.671874e-03 0.1922838 0.53379538 0.4260720 0.5739280 -2.337882e-01
## 175 5.165876e-03 0.3736916 0.49715960 0.4734785 0.5265215 -9.978687e-02
## 176 6.250491e-03 0.3326476 0.43684454 0.4774841 0.5225159 -1.448365e-01
## 177 5.663535e-03 0.4370600 0.78968458 0.4239700 0.5760300 1.308996e-02
## 178 8.189466e-03 0.2252951 0.18025593 0.5102286 0.4897714 -2.849335e-01
## 179 5.172787e-03 0.4031454 0.61457571 0.4547267 0.5452733 -5.158130e-02
## 180 2.048906e-03 0.4872749 0.58292540 0.4794905 0.5205095 7.784434e-03
## 181 6.680525e-03 0.3636182 0.39408263 0.4934099 0.5065901 -1.297917e-01
## 182 4.062967e-03 0.3965050 0.48170582 0.4817014 0.5182986 -8.519636e-02
## 183 8.424910e-03 0.3340574 0.38892729 0.4880961 0.5119039 -1.540387e-01
## 184 7.709358e-03 0.3274224 0.31523483 0.5026662 0.4973338 -1.752438e-01
## 185 2.544983e-03 0.4290130 0.46450097 0.4923817 0.5076183 -6.336872e-02
## 186 5.364966e-03 0.4586811 0.68428768 0.4515392 0.5484608 7.141898e-03
## 187 5.934410e-04 0.4911311 0.52208943 0.4933660 0.5066340 -2.234906e-03
## 188 5.020772e-05 0.4994611 0.50522291 0.4987653 0.5012347 6.957686e-04
## 189 2.873655e-03 0.4841331 0.62383339 0.4700182 0.5299818 1.411487e-02
## 190 5.514606e-03 0.3185310 0.30808449 0.5022897 0.4977103 -1.837587e-01
## 191 2.057597e-03 0.4332664 0.53784410 0.4775918 0.5224082 -4.432537e-02
## 192 8.173496e-03 0.2176725 0.56684663 0.4247719 0.5752281 -2.070994e-01
## 193 2.086392e-03 0.4565365 0.52919858 0.4844305 0.5155695 -2.789395e-02
## 194 3.212343e-03 0.4190469 0.74650843 0.4296499 0.5703501 -1.060297e-02
## 195 7.999160e-03 0.3045436 0.49258759 0.4594613 0.5405387 -1.549176e-01
## 196 9.251449e-07 0.4999717 0.50002371 0.4999888 0.5000112 -1.717811e-05
## 197 2.268155e-03 0.4381742 0.58788484 0.4679282 0.5320718 -2.975401e-02
## 198 7.367501e-03 0.3075208 0.80712880 0.3931824 0.6068176 -8.566162e-02
## 199 2.263759e-03 0.4295249 0.36917011 0.5130171 0.4869829 -8.349220e-02
## 200 3.956566e-03 0.4589564 0.90024359 0.4037468 0.5962532 5.520959e-02
## e_dual_0
## 1 3.837006e-01
## 2 3.122977e-01
## 3 -2.157056e-03
## 4 1.416911e-01
## 5 -1.723508e-01
## 6 3.169524e-03
## 7 1.805202e-02
## 8 4.325794e-01
## 9 2.480778e-01
## 10 1.751678e-02
## 11 3.914367e-01
## 12 -3.153219e-02
## 13 2.886044e-01
## 14 1.715566e-01
## 15 -5.611517e-02
## 16 1.839867e-01
## 17 4.286818e-04
## 18 -1.117203e-03
## 19 3.110187e-01
## 20 -1.216701e-02
## 21 -2.947397e-01
## 22 5.460075e-01
## 23 1.846696e-02
## 24 4.638672e-01
## 25 -1.916636e-01
## 26 -9.402232e-02
## 27 2.639343e-01
## 28 -9.327924e-03
## 29 8.937321e-02
## 30 7.833338e-02
## 31 4.125671e-01
## 32 -2.635806e-01
## 33 -8.833603e-02
## 34 1.781675e-03
## 35 9.474650e-02
## 36 1.574002e-02
## 37 -3.162603e-02
## 38 3.266930e-02
## 39 8.230708e-02
## 40 4.440247e-01
## 41 -1.260219e-01
## 42 1.474812e-02
## 43 -9.757400e-02
## 44 -2.484827e-01
## 45 1.512318e-01
## 46 4.401467e-01
## 47 6.135763e-02
## 48 -2.469273e-01
## 49 5.564408e-02
## 50 6.761532e-02
## 51 -2.243429e-01
## 52 2.803669e-02
## 53 2.100216e-01
## 54 -1.465249e-02
## 55 1.189618e-01
## 56 4.439923e-01
## 57 3.188630e-02
## 58 1.320313e-01
## 59 -3.422240e-02
## 60 2.376494e-01
## 61 4.735585e-02
## 62 2.547340e-03
## 63 6.501215e-02
## 64 1.220222e-02
## 65 5.735027e-01
## 66 -3.210716e-02
## 67 -8.377725e-03
## 68 1.486649e-01
## 69 2.423925e-01
## 70 1.383206e-01
## 71 2.196155e-02
## 72 2.794840e-01
## 73 -1.862622e-01
## 74 -2.307157e-01
## 75 2.068351e-01
## 76 4.108965e-02
## 77 6.184004e-02
## 78 1.012808e-02
## 79 1.403523e-01
## 80 -1.481132e-01
## 81 -8.536550e-02
## 82 1.600789e-01
## 83 2.462144e-01
## 84 4.687611e-01
## 85 -1.785511e-01
## 86 1.065698e-01
## 87 2.136966e-01
## 88 5.227662e-01
## 89 9.449866e-02
## 90 7.081334e-02
## 91 4.622598e-01
## 92 4.762395e-01
## 93 2.763143e-01
## 94 -1.621373e-01
## 95 -5.369225e-02
## 96 3.864862e-01
## 97 2.116840e-01
## 98 1.781192e-01
## 99 -1.143489e-01
## 100 1.469003e-01
## 101 -1.782747e-02
## 102 6.394813e-02
## 103 -4.501718e-01
## 104 5.731611e-01
## 105 -1.220168e-01
## 106 -8.417176e-03
## 107 8.523744e-03
## 108 -1.755847e-01
## 109 1.177791e-01
## 110 1.578484e-01
## 111 -2.064409e-01
## 112 9.816867e-02
## 113 -2.628076e-01
## 114 2.620085e-01
## 115 1.257470e-01
## 116 4.112471e-01
## 117 1.746479e-01
## 118 4.275572e-03
## 119 -1.263491e-02
## 120 1.613505e-01
## 121 3.421848e-01
## 122 1.116853e-02
## 123 2.479749e-01
## 124 4.665919e-01
## 125 2.400191e-03
## 126 8.820023e-03
## 127 7.104875e-04
## 128 3.149030e-02
## 129 7.386078e-02
## 130 1.035807e-01
## 131 1.865525e-02
## 132 8.141771e-02
## 133 3.607924e-01
## 134 1.445750e-02
## 135 1.347083e-01
## 136 4.220839e-02
## 137 1.378783e-01
## 138 -2.575700e-02
## 139 2.207294e-01
## 140 3.375247e-01
## 141 2.010900e-01
## 142 2.369863e-02
## 143 -1.823047e-01
## 144 6.577156e-01
## 145 3.089791e-01
## 146 -3.316870e-01
## 147 -1.529627e-02
## 148 2.617790e-02
## 149 4.027143e-01
## 150 9.629559e-02
## 151 -1.400237e-02
## 152 1.280952e-01
## 153 -1.762524e-01
## 154 -2.612423e-01
## 155 2.783906e-03
## 156 -1.258508e-01
## 157 1.264512e-01
## 158 -2.598735e-01
## 159 -4.398533e-02
## 160 -1.203920e-01
## 161 -1.615479e-01
## 162 2.319871e-01
## 163 2.850345e-01
## 164 -1.227927e-01
## 165 9.241436e-02
## 166 2.709845e-01
## 167 1.251532e-01
## 168 -2.364789e-01
## 169 4.034044e-02
## 170 3.967703e-03
## 171 5.887189e-02
## 172 1.441752e-02
## 173 6.447784e-02
## 174 -4.013264e-02
## 175 -2.936191e-02
## 176 -8.567137e-02
## 177 2.136546e-01
## 178 -3.095155e-01
## 179 6.930239e-02
## 180 6.241590e-02
## 181 -1.125075e-01
## 182 -3.659280e-02
## 183 -1.229766e-01
## 184 -1.820989e-01
## 185 -4.311731e-02
## 186 1.358269e-01
## 187 1.545543e-02
## 188 3.988234e-03
## 189 9.385161e-02
## 190 -1.896258e-01
## 191 1.543588e-02
## 192 -8.381430e-03
## 193 1.362907e-02
## 194 1.761583e-01
## 195 -4.795113e-02
## 196 1.255961e-05
## 197 5.581308e-02
## 198 2.003112e-01
## 199 -1.178128e-01
## 200 3.039904e-01
##
## $values
## $values$divergencekl
## [1] -15.35471
##
## $values$iterations
## [1] 69
##
## $values$message
## [1] "relative convergence (4)"
##
##
## $tol
## [1] 1e-10
##
## $v
## [,1] [,2] [,3]
## [1,] 1 0 -1
##
## $lambda
## (Intercept) Dcollege Totalincome Dunemp
## 1 12.77406 13.67724 -0.0001153192 -3.193615
## 0 76.48782 70.52669 -0.0002342221 -22.843038
##
## $checkrestrictions
## $checkrestrictions$g1
## [,1]
## [1,] 0
## [2,] 0
## [3,] 0
## [4,] 0
## [5,] 0
## [6,] 0
## [7,] 0
## [8,] 0
## [9,] 0
## [10,] 0
## [11,] 0
## [12,] 0
## [13,] 0
## [14,] 0
## [15,] 0
## [16,] 0
## [17,] 0
## [18,] 0
## [19,] 0
## [20,] 0
## [21,] 0
## [22,] 0
## [23,] 0
## [24,] 0
## [25,] 0
## [26,] 0
## [27,] 0
## [28,] 0
## [29,] 0
## [30,] 0
## [31,] 0
## [32,] 0
## [33,] 0
## [34,] 0
## [35,] 0
## [36,] 0
## [37,] 0
## [38,] 0
## [39,] 0
## [40,] 0
## [41,] 0
## [42,] 0
## [43,] 0
## [44,] 0
## [45,] 0
## [46,] 0
## [47,] 0
## [48,] 0
## [49,] 0
## [50,] 0
## [51,] 0
## [52,] 0
## [53,] 0
## [54,] 0
## [55,] 0
## [56,] 0
## [57,] 0
## [58,] 0
## [59,] 0
## [60,] 0
## [61,] 0
## [62,] 0
## [63,] 0
## [64,] 0
## [65,] 0
## [66,] 0
## [67,] 0
## [68,] 0
## [69,] 0
## [70,] 0
## [71,] 0
## [72,] 0
## [73,] 0
## [74,] 0
## [75,] 0
## [76,] 0
## [77,] 0
## [78,] 0
## [79,] 0
## [80,] 0
## [81,] 0
## [82,] 0
## [83,] 0
## [84,] 0
## [85,] 0
## [86,] 0
## [87,] 0
## [88,] 0
## [89,] 0
## [90,] 0
## [91,] 0
## [92,] 0
## [93,] 0
## [94,] 0
## [95,] 0
## [96,] 0
## [97,] 0
## [98,] 0
## [99,] 0
## [100,] 0
## [101,] 0
## [102,] 0
## [103,] 0
## [104,] 0
## [105,] 0
## [106,] 0
## [107,] 0
## [108,] 0
## [109,] 0
## [110,] 0
## [111,] 0
## [112,] 0
## [113,] 0
## [114,] 0
## [115,] 0
## [116,] 0
## [117,] 0
## [118,] 0
## [119,] 0
## [120,] 0
## [121,] 0
## [122,] 0
## [123,] 0
## [124,] 0
## [125,] 0
## [126,] 0
## [127,] 0
## [128,] 0
## [129,] 0
## [130,] 0
## [131,] 0
## [132,] 0
## [133,] 0
## [134,] 0
## [135,] 0
## [136,] 0
## [137,] 0
## [138,] 0
## [139,] 0
## [140,] 0
## [141,] 0
## [142,] 0
## [143,] 0
## [144,] 0
## [145,] 0
## [146,] 0
## [147,] 0
## [148,] 0
## [149,] 0
## [150,] 0
## [151,] 0
## [152,] 0
## [153,] 0
## [154,] 0
## [155,] 0
## [156,] 0
## [157,] 0
## [158,] 0
## [159,] 0
## [160,] 0
## [161,] 0
## [162,] 0
## [163,] 0
## [164,] 0
## [165,] 0
## [166,] 0
## [167,] 0
## [168,] 0
## [169,] 0
## [170,] 0
## [171,] 0
## [172,] 0
## [173,] 0
## [174,] 0
## [175,] 0
## [176,] 0
## [177,] 0
## [178,] 0
## [179,] 0
## [180,] 0
## [181,] 0
## [182,] 0
## [183,] 0
## [184,] 0
## [185,] 0
## [186,] 0
## [187,] 0
## [188,] 0
## [189,] 0
## [190,] 0
## [191,] 0
## [192,] 0
## [193,] 0
## [194,] 0
## [195,] 0
## [196,] 0
## [197,] 0
## [198,] 0
## [199,] 0
## [200,] 0
##
## $checkrestrictions$g2
## [,1] [,2]
## [1,] 0 0
## [2,] 0 0
## [3,] 0 0
## [4,] 0 0
## [5,] 0 0
## [6,] 0 0
## [7,] 0 0
## [8,] 0 0
## [9,] 0 0
## [10,] 0 0
## [11,] 0 0
## [12,] 0 0
## [13,] 0 0
## [14,] 0 0
## [15,] 0 0
## [16,] 0 0
## [17,] 0 0
## [18,] 0 0
## [19,] 0 0
## [20,] 0 0
## [21,] 0 0
## [22,] 0 0
## [23,] 0 0
## [24,] 0 0
## [25,] 0 0
## [26,] 0 0
## [27,] 0 0
## [28,] 0 0
## [29,] 0 0
## [30,] 0 0
## [31,] 0 0
## [32,] 0 0
## [33,] 0 0
## [34,] 0 0
## [35,] 0 0
## [36,] 0 0
## [37,] 0 0
## [38,] 0 0
## [39,] 0 0
## [40,] 0 0
## [41,] 0 0
## [42,] 0 0
## [43,] 0 0
## [44,] 0 0
## [45,] 0 0
## [46,] 0 0
## [47,] 0 0
## [48,] 0 0
## [49,] 0 0
## [50,] 0 0
## [51,] 0 0
## [52,] 0 0
## [53,] 0 0
## [54,] 0 0
## [55,] 0 0
## [56,] 0 0
## [57,] 0 0
## [58,] 0 0
## [59,] 0 0
## [60,] 0 0
## [61,] 0 0
## [62,] 0 0
## [63,] 0 0
## [64,] 0 0
## [65,] 0 0
## [66,] 0 0
## [67,] 0 0
## [68,] 0 0
## [69,] 0 0
## [70,] 0 0
## [71,] 0 0
## [72,] 0 0
## [73,] 0 0
## [74,] 0 0
## [75,] 0 0
## [76,] 0 0
## [77,] 0 0
## [78,] 0 0
## [79,] 0 0
## [80,] 0 0
## [81,] 0 0
## [82,] 0 0
## [83,] 0 0
## [84,] 0 0
## [85,] 0 0
## [86,] 0 0
## [87,] 0 0
## [88,] 0 0
## [89,] 0 0
## [90,] 0 0
## [91,] 0 0
## [92,] 0 0
## [93,] 0 0
## [94,] 0 0
## [95,] 0 0
## [96,] 0 0
## [97,] 0 0
## [98,] 0 0
## [99,] 0 0
## [100,] 0 0
## [101,] 0 0
## [102,] 0 0
## [103,] 0 0
## [104,] 0 0
## [105,] 0 0
## [106,] 0 0
## [107,] 0 0
## [108,] 0 0
## [109,] 0 0
## [110,] 0 0
## [111,] 0 0
## [112,] 0 0
## [113,] 0 0
## [114,] 0 0
## [115,] 0 0
## [116,] 0 0
## [117,] 0 0
## [118,] 0 0
## [119,] 0 0
## [120,] 0 0
## [121,] 0 0
## [122,] 0 0
## [123,] 0 0
## [124,] 0 0
## [125,] 0 0
## [126,] 0 0
## [127,] 0 0
## [128,] 0 0
## [129,] 0 0
## [130,] 0 0
## [131,] 0 0
## [132,] 0 0
## [133,] 0 0
## [134,] 0 0
## [135,] 0 0
## [136,] 0 0
## [137,] 0 0
## [138,] 0 0
## [139,] 0 0
## [140,] 0 0
## [141,] 0 0
## [142,] 0 0
## [143,] 0 0
## [144,] 0 0
## [145,] 0 0
## [146,] 0 0
## [147,] 0 0
## [148,] 0 0
## [149,] 0 0
## [150,] 0 0
## [151,] 0 0
## [152,] 0 0
## [153,] 0 0
## [154,] 0 0
## [155,] 0 0
## [156,] 0 0
## [157,] 0 0
## [158,] 0 0
## [159,] 0 0
## [160,] 0 0
## [161,] 0 0
## [162,] 0 0
## [163,] 0 0
## [164,] 0 0
## [165,] 0 0
## [166,] 0 0
## [167,] 0 0
## [168,] 0 0
## [169,] 0 0
## [170,] 0 0
## [171,] 0 0
## [172,] 0 0
## [173,] 0 0
## [174,] 0 0
## [175,] 0 0
## [176,] 0 0
## [177,] 0 0
## [178,] 0 0
## [179,] 0 0
## [180,] 0 0
## [181,] 0 0
## [182,] 0 0
## [183,] 0 0
## [184,] 0 0
## [185,] 0 0
## [186,] 0 0
## [187,] 0 0
## [188,] 0 0
## [189,] 0 0
## [190,] 0 0
## [191,] 0 0
## [192,] 0 0
## [193,] 0 0
## [194,] 0 0
## [195,] 0 0
## [196,] 0 0
## [197,] 0 0
## [198,] 0 0
## [199,] 0 0
## [200,] 0 0
##
## $checkrestrictions$g3
## y_factor1 y_factor0
## (Intercept) 0 0
## Dcollege 0 0
## Totalincome 0 0
## Dunemp 0 0
##
##
## $cross_moments_hp
## 1 0
## (Intercept) 0.34 0.66
## Dcollege 0.17 0.44
## Totalincome 103036.63 189594.78
## Dunemp 0.16 0.29
##
## $cross_moments_hs
## 1 0
## (Intercept) 0.34 0.66
## Dcollege 0.17 0.44
## Totalincome 103036.63 189594.78
## Dunemp 0.16 0.29
##
## $J
## [1] 2
##
## $fn
## datahp$poor_liq ~ Dcollege + Totalincome + Dunemp
##
## attr(,"class")
## [1] "kl"
The function will produce a data frame called a table with the following information:
Probabilities for each individual to each possibility j of the variable of interest Y.
The errors are calculated to the j possibilities of Y.
The prediction for each individual is the result of the sum of the probability plus the error.
The function provides information about the optimization process, in concrete:
Lagrange multipliers λ associated to each independent variables are also provided in the form of a data frame. In addition, it provides an object with the restrictions checked which should be approximately zero. Being g1 the restriction related to the unit probability constraint, g2 to the error unit sum constraint, and g3 to the consistency restriction that implies that the difference between the cross moment in both datasets must be zero. The restriction g3 can be checked thoroughly with the objects separately which are to be provided in the output as cross moments hp (the cross moments in datahp) and cross moments hs (the cross moments in datahs).
To make the results more visual, this package includes a personalized summary function, providing the means for each category j for the predictions, the probabilities and the error.
## Iterations[1] 69
## Kullback-Leibler divergence value[1] -15.35471
## [1] "mean_estimations"
## weights predictions_1 predictions_0 p_dual_1 p_dual_0 e_dual_1
## 1 0.006608031 0.3377783 0.6622217 0.4294887 0.5705113 -0.09171036
## e_dual_0
## 1 0.09171038
## [1] "lambda"
## (Intercept) Dcollege Totalincome Dunemp
## 1 12.77406 13.67724 -0.0001153192 -3.193615
## 0 76.48782 70.52669 -0.0002342221 -22.843038
Graphs included are generated with the plot function, showing the averages of the predictions for each territorial unit and the 95% confidence interval associated with each of them.
Notes: Arguments tol and iter can be defined by the user. The default tolerance has been set in 1e-10 while the maximum number or iterations by default is settled in 1000.
Suppose we do not have prior information about our variable of interest. In that case, the process starting point will be the uniform distribution as we do not have information to think one characteristic is more likely than the other.
The function ei_gce() will include by default the uniform distribution as Q if the user does not specify any other. This would be:
## $estimations
## weights predictions_1 predictions_0 p_dual_1 p_dual_0 e_dual_1
## 1 6.408614e-03 0.37714124 1.0373453 0.17143080 0.8285692 2.057104e-01
## 2 4.069074e-03 0.46516837 0.9465387 0.26050109 0.7394989 2.046673e-01
## 3 8.478890e-05 0.49554427 0.4949818 0.50026475 0.4997352 -4.720487e-03
## 4 6.019554e-03 0.29425455 0.7815640 0.27116772 0.7288323 2.308682e-02
## 5 8.529959e-03 0.24792085 0.3351759 0.45651988 0.5434801 -2.085990e-01
## 6 3.466777e-03 0.37076597 0.4876873 0.44458711 0.5554129 -7.382114e-02
## 7 7.143169e-03 0.25980106 0.5065021 0.38173082 0.6182692 -1.219298e-01
## 8 6.728993e-03 0.36038532 1.0624024 0.14987220 0.8501278 2.105131e-01
## 9 9.459067e-03 0.24653139 0.9526972 0.16596553 0.8340345 8.056587e-02
## 10 1.952733e-03 0.42547709 0.5404905 0.44585291 0.5541471 -2.037582e-02
## 11 6.884772e-03 0.36676136 1.0476604 0.16115983 0.8388402 2.056015e-01
## 12 1.046638e-03 0.42656460 0.4268691 0.49985561 0.5001444 -7.329100e-02
## 13 6.632154e-03 0.45686702 0.9334005 0.26416700 0.7358330 1.927000e-01
## 14 5.694566e-03 0.34661342 0.8392470 0.26618187 0.7338181 8.043156e-02
## 15 8.199805e-03 0.29044878 0.3979352 0.44769090 0.5523091 -1.572421e-01
## 16 7.974757e-03 0.34208515 0.8763006 0.24538694 0.7546131 9.669820e-02
## 17 1.016052e-05 0.50008404 0.5008871 0.49962202 0.5003780 4.620245e-04
## 18 1.077733e-03 0.47310069 0.4945723 0.48988963 0.5101104 -1.678894e-02
## 19 4.555596e-03 0.43194367 0.9691883 0.23344952 0.7665505 1.984941e-01
## 20 1.797040e-03 0.40140327 0.4763705 0.46452977 0.5354702 -6.312650e-02
## 21 7.726297e-03 0.36613330 0.2079584 0.57897918 0.4210208 -2.128459e-01
## 22 7.537852e-03 0.33716478 1.0938416 0.12177907 0.8782209 2.153857e-01
## 23 5.078895e-04 0.48835958 0.5396067 0.47587229 0.5241277 1.248730e-02
## 24 8.673474e-03 0.34928903 1.0777078 0.13630038 0.8636996 2.129886e-01
## 25 6.743411e-03 0.28645584 0.2974432 0.49452584 0.5054742 -2.080700e-01
## 26 2.597985e-03 0.34630227 0.3301960 0.50785849 0.4921415 -1.615562e-01
## 27 7.946911e-03 0.32381880 0.9735060 0.18622722 0.8137728 1.375916e-01
## 28 3.132542e-03 0.37158327 0.4640120 0.45608395 0.5439160 -8.450068e-02
## 29 1.413325e-03 0.50486840 0.6852096 0.41406951 0.5859305 9.079888e-02
## 30 1.952905e-03 0.50803523 0.6558099 0.42980542 0.5701946 7.822981e-02
## 31 7.786354e-03 0.34741236 1.0685414 0.14103857 0.8589614 2.063738e-01
## 32 6.412179e-03 0.36399170 0.2144078 0.57461752 0.4253825 -2.106258e-01
## 33 8.813903e-03 0.14764168 0.4589503 0.34574855 0.6542514 -1.981069e-01
## 34 3.104395e-03 0.35538686 0.5085653 0.42745367 0.5725463 -7.206681e-02
## 35 1.494452e-03 0.50471083 0.6952247 0.40910466 0.5908953 9.560617e-02
## 36 1.979537e-03 0.43997262 0.5224387 0.46116812 0.5388319 -2.119550e-02
## 37 1.781772e-03 0.42523291 0.4282943 0.49854806 0.5014519 -7.331516e-02
## 38 8.631740e-04 0.49491101 0.5728497 0.46325832 0.5367417 3.165269e-02
## 39 2.624354e-03 0.46497182 0.6798734 0.39816837 0.6018316 6.680345e-02
## 40 7.278409e-03 0.34905418 1.0741074 0.13836260 0.8616374 2.106916e-01
## 41 9.198636e-03 0.21786461 0.3741713 0.42227207 0.5777279 -2.044075e-01
## 42 8.939710e-04 0.45949759 0.5303565 0.46664821 0.5333518 -7.150611e-03
## 43 5.755561e-03 0.32270786 0.3367562 0.49312039 0.5068796 -1.704125e-01
## 44 9.197598e-03 0.32806664 0.2496263 0.53913535 0.4608647 -2.110687e-01
## 45 7.835590e-03 0.20378550 0.7852619 0.22815796 0.7718420 -2.437246e-02
## 46 7.304276e-03 0.34955433 1.0730092 0.13921843 0.8607816 2.103359e-01
## 47 2.825585e-03 0.43352582 0.6371530 0.40405005 0.5959499 2.947577e-02
## 48 5.701607e-03 0.36363400 0.2181770 0.57250289 0.4274971 -2.088689e-01
## 49 9.403839e-03 0.14601796 0.6247015 0.27122818 0.7287718 -1.252102e-01
## 50 8.874280e-03 0.08319603 0.6259964 0.23775918 0.7622408 -1.545631e-01
## 51 5.856153e-03 0.35220680 0.2339843 0.55886956 0.4411304 -2.066628e-01
## 52 7.506319e-04 0.50195984 0.5572225 0.47395691 0.5260431 2.800293e-02
## 53 2.829871e-03 0.51333909 0.8552131 0.33161744 0.6683826 1.817217e-01
## 54 1.403796e-03 0.42963844 0.4600167 0.48563963 0.5143604 -5.600119e-02
## 55 2.256222e-03 0.50956486 0.7420473 0.38819982 0.6118002 1.213650e-01
## 56 8.706739e-03 0.32821719 1.0912941 0.11983046 0.8801695 2.083867e-01
## 57 6.495227e-04 0.51007566 0.5661375 0.47355882 0.5264412 3.651684e-02
## 58 7.423215e-03 0.46620773 0.7547749 0.36198157 0.6380184 1.042262e-01
## 59 9.409367e-03 0.12397261 0.5121636 0.30905232 0.6909477 -1.850797e-01
## 60 3.467645e-03 0.47043120 0.8983506 0.28929940 0.7107006 1.811318e-01
## 61 4.891585e-03 0.25236015 0.5896630 0.34011454 0.6598855 -8.775439e-02
## 62 5.191919e-05 0.49955438 0.5055161 0.49719380 0.5028062 2.360581e-03
## 63 6.960881e-04 0.52499287 0.6371782 0.44671371 0.5532863 7.827916e-02
## 64 3.234067e-03 0.43693106 0.5181213 0.46176053 0.5382395 -2.482947e-02
## 65 8.095405e-03 0.32338768 1.1079813 0.10778777 0.8922122 2.155999e-01
## 66 2.123864e-03 0.38804726 0.4229340 0.48337199 0.5166280 -9.532473e-02
## 67 3.309518e-03 0.36617688 0.4653322 0.45286638 0.5471336 -8.668950e-02
## 68 5.300329e-03 0.45370051 0.7757856 0.34578402 0.6542160 1.079165e-01
## 69 7.890242e-03 0.43151835 0.9045737 0.26894812 0.7310519 1.625702e-01
## 70 5.248723e-03 0.44718762 0.7585648 0.35144311 0.6485569 9.574452e-02
## 71 9.625057e-04 0.48690885 0.5426170 0.47377134 0.5262287 1.313751e-02
## 72 3.609097e-03 0.48364078 0.9192295 0.28373016 0.7162698 1.999106e-01
## 73 5.617329e-03 0.34034003 0.2579076 0.54093438 0.4590656 -2.005943e-01
## 74 9.237887e-03 0.26393392 0.3105135 0.47674371 0.5232563 -2.128098e-01
## 75 9.275353e-03 0.20156878 0.8823507 0.18190526 0.8180947 1.966352e-02
## 76 7.561670e-04 0.49760860 0.5883611 0.45717689 0.5428231 4.043171e-02
## 77 1.374263e-03 0.48128816 0.6314624 0.42902088 0.5709791 5.226728e-02
## 78 2.232129e-03 0.37084550 0.5174122 0.43073032 0.5692697 -5.988483e-02
## 79 7.759625e-03 0.19416137 0.7630443 0.23377581 0.7662242 -3.961444e-02
## 80 3.268253e-03 0.35954594 0.2702605 0.54401485 0.4559852 -1.844689e-01
## 81 5.423895e-03 0.32883027 0.3491396 0.49009389 0.5099061 -1.612636e-01
## 82 3.519797e-03 0.44627564 0.8133954 0.32337015 0.6766299 1.229055e-01
## 83 3.686690e-03 0.46329522 0.9091087 0.28031362 0.7196864 1.829816e-01
## 84 8.770650e-03 0.34686167 1.0804290 0.13370219 0.8662978 2.131595e-01
## 85 4.499834e-03 0.32020853 0.2749703 0.52248058 0.4775194 -2.022720e-01
## 86 6.913635e-03 0.45482457 0.7095721 0.37906307 0.6209369 7.576150e-02
## 87 7.423989e-03 0.38267172 0.9137446 0.24307453 0.7569255 1.395972e-01
## 88 9.184997e-03 0.32784976 1.1020921 0.11311844 0.8868816 2.147313e-01
## 89 9.934938e-04 0.53182183 0.6919862 0.42330355 0.5766964 1.085183e-01
## 90 7.108557e-03 0.41232917 0.6358960 0.39477026 0.6052297 1.755891e-02
## 91 6.307975e-03 0.35899760 1.0677309 0.14614702 0.8538530 2.128506e-01
## 92 5.444530e-03 0.36801098 1.0605664 0.15404711 0.8459529 2.139639e-01
## 93 5.708904e-03 0.40224861 0.9639683 0.22381773 0.7761823 1.784309e-01
## 94 7.141561e-03 0.26731226 0.3222444 0.47266687 0.5273331 -2.053546e-01
## 95 7.903713e-03 0.16503977 0.4725605 0.34873889 0.6512611 -1.836991e-01
## 96 5.645807e-03 0.39114729 1.0268658 0.18329921 0.8167008 2.078481e-01
## 97 3.539554e-03 0.49407716 0.8675386 0.31638400 0.6836160 1.776932e-01
## 98 2.396317e-03 0.52472961 0.8185412 0.35610945 0.6438905 1.686202e-01
## 99 3.785424e-03 0.31833636 0.3185355 0.49990197 0.5000980 -1.815656e-01
## 100 6.899727e-03 0.34665494 0.8118087 0.27989298 0.7201070 6.676197e-02
## 101 1.963958e-03 0.38847654 0.4653266 0.46355677 0.5364432 -7.508023e-02
## 102 4.301069e-03 0.46970567 0.6283352 0.42510995 0.5748901 4.459572e-02
## 103 8.824290e-03 0.44210577 0.1264228 0.65781858 0.3421814 -2.157128e-01
## 104 9.245072e-03 0.29598216 1.1344334 0.08099393 0.9190061 2.149882e-01
## 105 7.604964e-03 0.24465133 0.3562680 0.44460826 0.5553917 -1.999569e-01
## 106 7.759268e-04 0.45320405 0.4823024 0.48628343 0.5137166 -3.307938e-02
## 107 6.426895e-03 0.36017769 0.5030301 0.43233606 0.5676639 -7.215837e-02
## 108 5.150249e-03 0.34234848 0.2619044 0.53989153 0.4601085 -1.975430e-01
## 109 5.158771e-03 0.38924139 0.7550982 0.32689679 0.6731032 6.234460e-02
## 110 7.247160e-03 0.48560879 0.7937026 0.35114911 0.6488509 1.344597e-01
## 111 7.664692e-03 0.27774103 0.3016060 0.48809769 0.5119023 -2.103567e-01
## 112 4.033598e-03 0.35902331 0.7016212 0.33886187 0.6611381 2.016145e-02
## 113 8.610544e-03 0.29051864 0.2822042 0.50415281 0.4958472 -2.136342e-01
## 114 9.173485e-03 0.27410837 0.9733603 0.16627370 0.8337263 1.078347e-01
## 115 2.312141e-03 0.51128192 0.7527716 0.38361563 0.6163844 1.276663e-01
## 116 5.785912e-03 0.40348498 1.0217407 0.19141205 0.8085880 2.120729e-01
## 117 3.133029e-03 0.50150723 0.8249308 0.34222256 0.6577774 1.592847e-01
## 118 3.027803e-04 0.49290501 0.5075815 0.49309179 0.5069082 -1.867798e-04
## 119 6.494774e-04 0.46052427 0.4682541 0.49635504 0.5036450 -3.583076e-02
## 120 2.627321e-03 0.51441102 0.8032533 0.35933654 0.6406635 1.550745e-01
## 121 6.300118e-03 0.38606930 1.0151756 0.18797894 0.8120211 1.980904e-01
## 122 5.009005e-03 0.39456016 0.5113977 0.44484479 0.5551552 -5.028463e-02
## 123 8.546357e-03 0.36682709 0.9593040 0.21165628 0.7883437 1.551708e-01
## 124 5.935042e-03 0.36343500 1.0640665 0.15011601 0.8498840 2.133190e-01
## 125 5.670056e-05 0.49996438 0.5053768 0.49745234 0.5025477 2.512032e-03
## 126 1.956694e-04 0.49743772 0.5190521 0.48982517 0.5101748 7.612544e-03
## 127 3.491569e-03 0.36763750 0.4826404 0.44545031 0.5545497 -7.781280e-02
## 128 6.018842e-03 0.25616411 0.5745524 0.34884899 0.6511510 -9.268489e-02
## 129 2.453778e-03 0.42789201 0.6552214 0.39282715 0.6071729 3.506486e-02
## 130 3.330195e-03 0.45417305 0.7229733 0.37220846 0.6277915 8.196459e-02
## 131 4.568058e-04 0.49890141 0.5417206 0.47983381 0.5201662 1.906760e-02
## 132 1.878873e-03 0.49715241 0.6752413 0.41533262 0.5846674 8.181978e-02
## 133 7.274750e-03 0.36343790 1.0385279 0.16518574 0.8348143 1.982522e-01
## 134 8.055270e-03 0.17014298 0.5542960 0.31464696 0.6853530 -1.445040e-01
## 135 7.918719e-03 0.35004368 0.7405532 0.31614415 0.6838558 3.389953e-02
## 136 1.613960e-03 0.44481835 0.5890183 0.43212130 0.5678787 1.269706e-02
## 137 4.043005e-03 0.45292970 0.7853299 0.34062783 0.6593722 1.123019e-01
## 138 2.836492e-03 0.36867919 0.4335518 0.46904473 0.5309553 -1.003655e-01
## 139 8.648536e-03 0.40487931 0.8830264 0.26894495 0.7310550 1.359344e-01
## 140 7.121030e-03 0.40200465 1.0056064 0.20009288 0.7999071 2.019118e-01
## 141 7.015624e-03 0.50187229 0.8437294 0.33252515 0.6674749 1.693471e-01
## 142 2.042604e-03 0.44644732 0.5396343 0.45614015 0.5438598 -9.692835e-03
## 143 7.276373e-03 0.27335983 0.3110208 0.48123850 0.5187615 -2.078787e-01
## 144 8.504937e-03 0.28247516 1.1493785 0.06658549 0.9334145 2.158897e-01
## 145 9.535921e-03 0.40889048 0.9714828 0.22238904 0.7776110 1.865014e-01
## 146 8.545091e-03 0.32920842 0.2406706 0.54424965 0.4557503 -2.150412e-01
## 147 2.254398e-03 0.37776176 0.4714298 0.45556208 0.5444379 -7.780032e-02
## 148 5.514651e-03 0.27258801 0.5631967 0.36208360 0.6379164 -8.949559e-02
## 149 6.254560e-03 0.37577592 1.0434209 0.16731376 0.8326862 2.084622e-01
## 150 6.128050e-03 0.46189359 0.6907313 0.39148613 0.6085139 7.040746e-02
## 151 1.952048e-03 0.39256313 0.4730384 0.46188233 0.5381177 -6.931920e-02
## 152 8.239200e-03 0.33030141 0.7244077 0.31481580 0.6851842 1.548561e-02
## 153 4.212187e-03 0.32458168 0.2727708 0.52573386 0.4742661 -2.011522e-01
## 154 6.562633e-03 0.32256036 0.2521837 0.53513536 0.4648646 -2.125750e-01
## 155 8.529452e-05 0.49978515 0.5056391 0.49724449 0.5027555 2.540660e-03
## 156 4.627415e-03 0.30253610 0.3171597 0.49277404 0.5072260 -1.902379e-01
## 157 7.506022e-03 0.19114461 0.7362700 0.24439885 0.7556011 -5.325424e-02
## 158 5.802968e-03 0.36849401 0.2110729 0.57850614 0.4214939 -2.100121e-01
## 159 8.889093e-03 0.13810196 0.4959950 0.32384848 0.6761515 -1.857465e-01
## 160 3.338891e-03 0.35704129 0.2980884 0.52889689 0.4711031 -1.718556e-01
## 161 5.739428e-03 0.29183904 0.3035596 0.49417588 0.5058241 -2.023368e-01
## 162 9.051019e-03 0.24618976 0.9294581 0.17769374 0.8223063 6.849602e-02
## 163 7.187216e-03 0.44810275 0.9357911 0.25904135 0.7409587 1.890614e-01
## 164 2.371262e-03 0.37102330 0.2899472 0.53968911 0.4603109 -1.686658e-01
## 165 5.791201e-03 0.33183350 0.7032194 0.32554578 0.6744542 6.287720e-03
## 166 5.959915e-03 0.39382659 0.9629482 0.22086086 0.7791391 1.729657e-01
## 167 8.379680e-03 0.25726599 0.7659295 0.26171938 0.7382806 -4.453391e-03
## 168 8.564844e-03 0.32893639 0.2510774 0.53882507 0.4611749 -2.098887e-01
## 169 1.064177e-03 0.50320864 0.5820375 0.46280363 0.5371964 4.040500e-02
## 170 6.110630e-03 0.23336254 0.5255237 0.35980766 0.6401923 -1.264451e-01
## 171 1.771706e-03 0.52165766 0.6221197 0.45237445 0.5476256 6.928321e-02
## 172 3.746941e-03 0.42731664 0.5216065 0.45558328 0.5444167 -2.826664e-02
## 173 8.344937e-03 0.25568850 0.5881502 0.34243332 0.6575667 -8.674482e-02
## 174 8.671874e-03 0.14356028 0.4964644 0.32654345 0.6734566 -1.829832e-01
## 175 5.165876e-03 0.29467774 0.4293383 0.43492991 0.5650701 -1.402522e-01
## 176 6.250491e-03 0.26256157 0.3704982 0.44683127 0.5531687 -1.842697e-01
## 177 5.663535e-03 0.47401131 0.8621297 0.31031896 0.6896810 1.636923e-01
## 178 8.189466e-03 0.32238323 0.2483320 0.53700276 0.4629972 -2.146195e-01
## 179 5.172787e-03 0.37674555 0.6194582 0.38587109 0.6141289 -9.125533e-03
## 180 2.048906e-03 0.51888456 0.6288527 0.44784837 0.5521516 7.103619e-02
## 181 6.680525e-03 0.31019462 0.3270606 0.49169947 0.5083005 -1.815048e-01
## 182 4.062967e-03 0.32344524 0.4156342 0.45557096 0.5444290 -1.321257e-01
## 183 8.424910e-03 0.28920351 0.3299449 0.47986599 0.5201340 -1.906625e-01
## 184 7.709358e-03 0.31518486 0.2788500 0.51806096 0.4819390 -2.028761e-01
## 185 2.544983e-03 0.36650207 0.4030769 0.48246228 0.5175377 -1.159602e-01
## 186 5.364966e-03 0.50714408 0.7578390 0.37916477 0.6208352 1.279793e-01
## 187 5.934410e-04 0.49408195 0.5305317 0.48283973 0.5171603 1.124223e-02
## 188 5.020772e-05 0.50207164 0.5088920 0.49678951 0.5032105 5.282130e-03
## 189 2.873655e-03 0.52784564 0.6870685 0.42385754 0.5761425 1.039881e-01
## 190 5.514606e-03 0.30662476 0.2813499 0.51258087 0.4874191 -2.059561e-01
## 191 2.057597e-03 0.41814279 0.5359942 0.44449887 0.5555011 -2.635608e-02
## 192 8.173496e-03 0.15968124 0.5246355 0.32242309 0.6775769 -1.627418e-01
## 193 2.086392e-03 0.43346769 0.5171342 0.46058869 0.5394113 -2.712101e-02
## 194 3.212343e-03 0.46856268 0.8320486 0.32370141 0.6762986 1.448613e-01
## 195 7.999160e-03 0.22223375 0.4232662 0.40126813 0.5987319 -1.790344e-01
## 196 9.251449e-07 0.49996937 0.5000287 0.49997206 0.5000279 -2.691494e-06
## 197 2.268155e-03 0.45362675 0.6246519 0.41936308 0.5806369 3.426367e-02
## 198 7.367501e-03 0.37636980 0.8968114 0.24939839 0.7506016 1.269714e-01
## 199 2.263759e-03 0.37305021 0.2949578 0.53817011 0.4618299 -1.651199e-01
## 200 3.956566e-03 0.46982353 0.9399072 0.26622578 0.7337742 2.035977e-01
## e_dual_0
## 1 2.087761e-01
## 2 2.070398e-01
## 3 -4.753428e-03
## 4 5.273171e-02
## 5 -2.083042e-01
## 6 -6.772560e-02
## 7 -1.117670e-01
## 8 2.122746e-01
## 9 1.186627e-01
## 10 -1.365657e-02
## 11 2.088203e-01
## 12 -7.327534e-02
## 13 1.975675e-01
## 14 1.054288e-01
## 15 -1.543739e-01
## 16 1.216876e-01
## 17 5.090774e-04
## 18 -1.553809e-02
## 19 2.026378e-01
## 20 -5.909976e-02
## 21 -2.130624e-01
## 22 2.156207e-01
## 23 1.547897e-02
## 24 2.140081e-01
## 25 -2.080310e-01
## 26 -1.619456e-01
## 27 1.597333e-01
## 28 -7.990403e-02
## 29 9.927907e-02
## 30 8.561535e-02
## 31 2.095800e-01
## 32 -2.109747e-01
## 33 -1.953012e-01
## 34 -6.398107e-02
## 35 1.043293e-01
## 36 -1.639317e-02
## 37 -7.315760e-02
## 38 3.610801e-02
## 39 7.804174e-02
## 40 2.124700e-01
## 41 -2.035567e-01
## 42 -2.995335e-03
## 43 -1.701234e-01
## 44 -2.112383e-01
## 45 1.341984e-02
## 46 2.122277e-01
## 47 4.120302e-02
## 48 -2.093201e-01
## 49 -1.040704e-01
## 50 -1.362445e-01
## 51 -2.071462e-01
## 52 3.117940e-02
## 53 1.868306e-01
## 54 -5.434367e-02
## 55 1.302471e-01
## 56 2.111246e-01
## 57 3.969632e-02
## 58 1.167564e-01
## 59 -1.787841e-01
## 60 1.876500e-01
## 61 -7.022242e-02
## 62 2.709862e-03
## 63 8.389189e-02
## 64 -2.011813e-02
## 65 2.157690e-01
## 66 -9.369402e-02
## 67 -8.180145e-02
## 68 1.215697e-01
## 69 1.735218e-01
## 70 1.100079e-01
## 71 1.638838e-02
## 72 2.029597e-01
## 73 -2.011580e-01
## 74 -2.127428e-01
## 75 6.425597e-02
## 76 4.553799e-02
## 77 6.048331e-02
## 78 -5.185747e-02
## 79 -3.179890e-03
## 80 -1.857247e-01
## 81 -1.607665e-01
## 82 1.367655e-01
## 83 1.894223e-01
## 84 2.141312e-01
## 85 -2.025491e-01
## 86 8.863520e-02
## 87 1.568191e-01
## 88 2.152105e-01
## 89 1.152898e-01
## 90 3.066622e-02
## 91 2.138780e-01
## 92 2.146135e-01
## 93 1.877860e-01
## 94 -2.050887e-01
## 95 -1.787007e-01
## 96 2.101650e-01
## 97 1.839226e-01
## 98 1.746507e-01
## 99 -1.815625e-01
## 100 9.170167e-02
## 101 -7.111658e-02
## 102 5.344515e-02
## 103 -2.157587e-01
## 104 2.154274e-01
## 105 -1.991238e-01
## 106 -3.141418e-02
## 107 -6.463382e-02
## 108 -1.982041e-01
## 109 8.199500e-02
## 110 1.448517e-01
## 111 -2.102963e-01
## 112 4.048309e-02
## 113 -2.136430e-01
## 114 1.396340e-01
## 115 1.363872e-01
## 116 2.131528e-01
## 117 1.671534e-01
## 118 6.732463e-04
## 119 -3.539085e-02
## 120 1.625898e-01
## 121 2.031546e-01
## 122 -4.375747e-02
## 123 1.709603e-01
## 124 2.141825e-01
## 125 2.829127e-03
## 126 8.877262e-03
## 127 -7.190929e-02
## 128 -7.659865e-02
## 129 4.804852e-02
## 130 9.518179e-02
## 131 2.155438e-02
## 132 9.057391e-02
## 133 2.037136e-01
## 134 -1.310570e-01
## 135 5.669736e-02
## 136 2.113961e-02
## 137 1.259577e-01
## 138 -9.740352e-02
## 139 1.519713e-01
## 140 2.056993e-01
## 141 1.762546e-01
## 142 -4.225555e-03
## 143 -2.077407e-01
## 144 2.159640e-01
## 145 1.938718e-01
## 146 -2.150798e-01
## 147 -7.300813e-02
## 148 -7.471968e-02
## 149 2.107346e-01
## 150 8.221743e-02
## 151 -6.507926e-02
## 152 3.922351e-02
## 153 -2.014953e-01
## 154 -2.126809e-01
## 155 2.883625e-03
## 156 -1.900663e-01
## 157 -1.933119e-02
## 158 -2.104210e-01
## 159 -1.801565e-01
## 160 -1.730147e-01
## 161 -2.022645e-01
## 162 1.071519e-01
## 163 1.948324e-01
## 164 -1.703637e-01
## 165 2.876522e-02
## 166 1.838091e-01
## 167 2.764886e-02
## 168 -2.100975e-01
## 169 4.484118e-02
## 170 -1.146687e-01
## 171 7.449418e-02
## 172 -2.281018e-02
## 173 -6.941650e-02
## 174 -1.769922e-01
## 175 -1.357318e-01
## 176 -1.826705e-01
## 177 1.724487e-01
## 178 -2.146653e-01
## 179 5.329328e-03
## 180 7.670110e-02
## 181 -1.812400e-01
## 182 -1.287948e-01
## 183 -1.901891e-01
## 184 -2.030890e-01
## 185 -1.144608e-01
## 186 1.370038e-01
## 187 1.337146e-02
## 188 5.681506e-03
## 189 1.109260e-01
## 190 -2.060693e-01
## 191 -1.950693e-02
## 192 -1.529414e-01
## 193 -2.227712e-02
## 194 1.557500e-01
## 195 -1.754657e-01
## 196 7.862659e-07
## 197 4.401497e-02
## 198 1.462098e-01
## 199 -1.668721e-01
## 200 2.061330e-01
##
## $values
## $values$divergencekl
## [1] -184.3254
##
## $values$iterations
## [1] 94
##
## $values$message
## [1] "relative convergence (4)"
##
##
## $tol
## [1] 1e-10
##
## $v
## [,1] [,2] [,3]
## [1,] 0.2160606 0 -0.2160606
##
## $lambda
## (Intercept) Dcollege Totalincome Dunemp
## 1 1925.469 2117.909 -0.008238330 -485.6138
## 0 2092.312 2267.590 -0.008558383 -539.4989
##
## $checkrestrictions
## $checkrestrictions$g1
## [,1]
## [1,] 0
## [2,] 0
## [3,] 0
## [4,] 0
## [5,] 0
## [6,] 0
## [7,] 0
## [8,] 0
## [9,] 0
## [10,] 0
## [11,] 0
## [12,] 0
## [13,] 0
## [14,] 0
## [15,] 0
## [16,] 0
## [17,] 0
## [18,] 0
## [19,] 0
## [20,] 0
## [21,] 0
## [22,] 0
## [23,] 0
## [24,] 0
## [25,] 0
## [26,] 0
## [27,] 0
## [28,] 0
## [29,] 0
## [30,] 0
## [31,] 0
## [32,] 0
## [33,] 0
## [34,] 0
## [35,] 0
## [36,] 0
## [37,] 0
## [38,] 0
## [39,] 0
## [40,] 0
## [41,] 0
## [42,] 0
## [43,] 0
## [44,] 0
## [45,] 0
## [46,] 0
## [47,] 0
## [48,] 0
## [49,] 0
## [50,] 0
## [51,] 0
## [52,] 0
## [53,] 0
## [54,] 0
## [55,] 0
## [56,] 0
## [57,] 0
## [58,] 0
## [59,] 0
## [60,] 0
## [61,] 0
## [62,] 0
## [63,] 0
## [64,] 0
## [65,] 0
## [66,] 0
## [67,] 0
## [68,] 0
## [69,] 0
## [70,] 0
## [71,] 0
## [72,] 0
## [73,] 0
## [74,] 0
## [75,] 0
## [76,] 0
## [77,] 0
## [78,] 0
## [79,] 0
## [80,] 0
## [81,] 0
## [82,] 0
## [83,] 0
## [84,] 0
## [85,] 0
## [86,] 0
## [87,] 0
## [88,] 0
## [89,] 0
## [90,] 0
## [91,] 0
## [92,] 0
## [93,] 0
## [94,] 0
## [95,] 0
## [96,] 0
## [97,] 0
## [98,] 0
## [99,] 0
## [100,] 0
## [101,] 0
## [102,] 0
## [103,] 0
## [104,] 0
## [105,] 0
## [106,] 0
## [107,] 0
## [108,] 0
## [109,] 0
## [110,] 0
## [111,] 0
## [112,] 0
## [113,] 0
## [114,] 0
## [115,] 0
## [116,] 0
## [117,] 0
## [118,] 0
## [119,] 0
## [120,] 0
## [121,] 0
## [122,] 0
## [123,] 0
## [124,] 0
## [125,] 0
## [126,] 0
## [127,] 0
## [128,] 0
## [129,] 0
## [130,] 0
## [131,] 0
## [132,] 0
## [133,] 0
## [134,] 0
## [135,] 0
## [136,] 0
## [137,] 0
## [138,] 0
## [139,] 0
## [140,] 0
## [141,] 0
## [142,] 0
## [143,] 0
## [144,] 0
## [145,] 0
## [146,] 0
## [147,] 0
## [148,] 0
## [149,] 0
## [150,] 0
## [151,] 0
## [152,] 0
## [153,] 0
## [154,] 0
## [155,] 0
## [156,] 0
## [157,] 0
## [158,] 0
## [159,] 0
## [160,] 0
## [161,] 0
## [162,] 0
## [163,] 0
## [164,] 0
## [165,] 0
## [166,] 0
## [167,] 0
## [168,] 0
## [169,] 0
## [170,] 0
## [171,] 0
## [172,] 0
## [173,] 0
## [174,] 0
## [175,] 0
## [176,] 0
## [177,] 0
## [178,] 0
## [179,] 0
## [180,] 0
## [181,] 0
## [182,] 0
## [183,] 0
## [184,] 0
## [185,] 0
## [186,] 0
## [187,] 0
## [188,] 0
## [189,] 0
## [190,] 0
## [191,] 0
## [192,] 0
## [193,] 0
## [194,] 0
## [195,] 0
## [196,] 0
## [197,] 0
## [198,] 0
## [199,] 0
## [200,] 0
##
## $checkrestrictions$g2
## [,1] [,2]
## [1,] 0 0
## [2,] 0 0
## [3,] 0 0
## [4,] 0 0
## [5,] 0 0
## [6,] 0 0
## [7,] 0 0
## [8,] 0 0
## [9,] 0 0
## [10,] 0 0
## [11,] 0 0
## [12,] 0 0
## [13,] 0 0
## [14,] 0 0
## [15,] 0 0
## [16,] 0 0
## [17,] 0 0
## [18,] 0 0
## [19,] 0 0
## [20,] 0 0
## [21,] 0 0
## [22,] 0 0
## [23,] 0 0
## [24,] 0 0
## [25,] 0 0
## [26,] 0 0
## [27,] 0 0
## [28,] 0 0
## [29,] 0 0
## [30,] 0 0
## [31,] 0 0
## [32,] 0 0
## [33,] 0 0
## [34,] 0 0
## [35,] 0 0
## [36,] 0 0
## [37,] 0 0
## [38,] 0 0
## [39,] 0 0
## [40,] 0 0
## [41,] 0 0
## [42,] 0 0
## [43,] 0 0
## [44,] 0 0
## [45,] 0 0
## [46,] 0 0
## [47,] 0 0
## [48,] 0 0
## [49,] 0 0
## [50,] 0 0
## [51,] 0 0
## [52,] 0 0
## [53,] 0 0
## [54,] 0 0
## [55,] 0 0
## [56,] 0 0
## [57,] 0 0
## [58,] 0 0
## [59,] 0 0
## [60,] 0 0
## [61,] 0 0
## [62,] 0 0
## [63,] 0 0
## [64,] 0 0
## [65,] 0 0
## [66,] 0 0
## [67,] 0 0
## [68,] 0 0
## [69,] 0 0
## [70,] 0 0
## [71,] 0 0
## [72,] 0 0
## [73,] 0 0
## [74,] 0 0
## [75,] 0 0
## [76,] 0 0
## [77,] 0 0
## [78,] 0 0
## [79,] 0 0
## [80,] 0 0
## [81,] 0 0
## [82,] 0 0
## [83,] 0 0
## [84,] 0 0
## [85,] 0 0
## [86,] 0 0
## [87,] 0 0
## [88,] 0 0
## [89,] 0 0
## [90,] 0 0
## [91,] 0 0
## [92,] 0 0
## [93,] 0 0
## [94,] 0 0
## [95,] 0 0
## [96,] 0 0
## [97,] 0 0
## [98,] 0 0
## [99,] 0 0
## [100,] 0 0
## [101,] 0 0
## [102,] 0 0
## [103,] 0 0
## [104,] 0 0
## [105,] 0 0
## [106,] 0 0
## [107,] 0 0
## [108,] 0 0
## [109,] 0 0
## [110,] 0 0
## [111,] 0 0
## [112,] 0 0
## [113,] 0 0
## [114,] 0 0
## [115,] 0 0
## [116,] 0 0
## [117,] 0 0
## [118,] 0 0
## [119,] 0 0
## [120,] 0 0
## [121,] 0 0
## [122,] 0 0
## [123,] 0 0
## [124,] 0 0
## [125,] 0 0
## [126,] 0 0
## [127,] 0 0
## [128,] 0 0
## [129,] 0 0
## [130,] 0 0
## [131,] 0 0
## [132,] 0 0
## [133,] 0 0
## [134,] 0 0
## [135,] 0 0
## [136,] 0 0
## [137,] 0 0
## [138,] 0 0
## [139,] 0 0
## [140,] 0 0
## [141,] 0 0
## [142,] 0 0
## [143,] 0 0
## [144,] 0 0
## [145,] 0 0
## [146,] 0 0
## [147,] 0 0
## [148,] 0 0
## [149,] 0 0
## [150,] 0 0
## [151,] 0 0
## [152,] 0 0
## [153,] 0 0
## [154,] 0 0
## [155,] 0 0
## [156,] 0 0
## [157,] 0 0
## [158,] 0 0
## [159,] 0 0
## [160,] 0 0
## [161,] 0 0
## [162,] 0 0
## [163,] 0 0
## [164,] 0 0
## [165,] 0 0
## [166,] 0 0
## [167,] 0 0
## [168,] 0 0
## [169,] 0 0
## [170,] 0 0
## [171,] 0 0
## [172,] 0 0
## [173,] 0 0
## [174,] 0 0
## [175,] 0 0
## [176,] 0 0
## [177,] 0 0
## [178,] 0 0
## [179,] 0 0
## [180,] 0 0
## [181,] 0 0
## [182,] 0 0
## [183,] 0 0
## [184,] 0 0
## [185,] 0 0
## [186,] 0 0
## [187,] 0 0
## [188,] 0 0
## [189,] 0 0
## [190,] 0 0
## [191,] 0 0
## [192,] 0 0
## [193,] 0 0
## [194,] 0 0
## [195,] 0 0
## [196,] 0 0
## [197,] 0 0
## [198,] 0 0
## [199,] 0 0
## [200,] 0 0
##
## $checkrestrictions$g3
## y_factor1 y_factor0
## (Intercept) 0.000 0.000
## Dcollege 0.000 0.000
## Totalincome -0.153 0.027
## Dunemp 0.000 0.000
##
##
## $cross_moments_hp
## 1 0
## (Intercept) 0.34 0.66
## Dcollege 0.17 0.44
## Totalincome 103036.63 189594.78
## Dunemp 0.16 0.29
##
## $cross_moments_hs
## 1 0
## (Intercept) 0.34 0.66
## Dcollege 0.17 0.44
## Totalincome 103036.79 189594.75
## Dunemp 0.16 0.29
##
## $J
## [1] 2
##
## $fn
## datahp$poor_liq ~ Dcollege + Totalincome + Dunemp
##
## attr(,"class")
## [1] "kl"
The summary and the plot options are the same as in the previous case.
In the case the user does not have prior information the function ei_gme() is also available. This function is provided for cases where the user may prefer using GME (Generalized maximum entropy) if the user has a big volume of data, because it is a more efficient function in computational terms than ei_gce() with the uniform distribution as prior. Both functions should provide the same result.
ei_gme() applies the Shannon entropy function to the optimization. It is adequate when you cannot assume anything about the distribution of Y. So the starting point is the uniform distribution.
Using the same example, our variable of interest is the poverty rate in terms of wealth and our independent variables are the income and dummies for unemployment and college studies. In this case, we need to define the function
The function will produce the same output as ei_gce(), see the previous section for further details.
## $estimations
## weights predictions_1 predictions_0 p_dual_1 p_dual_0 e_dual_1
## 1 6.408614e-03 0.37714100 1.0373456 0.17143056 0.8285694 2.057104e-01
## 2 4.069074e-03 0.46516844 0.9465387 0.26050116 0.7394988 2.046673e-01
## 3 8.478890e-05 0.49554426 0.4949818 0.50026475 0.4997352 -4.720492e-03
## 4 6.019554e-03 0.29425398 0.7815639 0.27116751 0.7288325 2.308647e-02
## 5 8.529959e-03 0.24791986 0.3351769 0.45651891 0.5434811 -2.085990e-01
## 6 3.466777e-03 0.37076550 0.4876877 0.44458668 0.5554133 -7.382118e-02
## 7 7.143169e-03 0.25980016 0.5065030 0.38172997 0.6182700 -1.219298e-01
## 8 6.728993e-03 0.36038509 1.0624027 0.14987197 0.8501280 2.105131e-01
## 9 9.459067e-03 0.24653071 0.9526971 0.16596528 0.8340347 8.056542e-02
## 10 1.952733e-03 0.42547701 0.5404902 0.44585302 0.5541470 -2.037601e-02
## 11 6.884772e-03 0.36676112 1.0476607 0.16115959 0.8388404 2.056015e-01
## 12 1.046638e-03 0.42656444 0.4268691 0.49985549 0.5001445 -7.329105e-02
## 13 6.632154e-03 0.45686631 0.9334013 0.26416625 0.7358337 1.927001e-01
## 14 5.694566e-03 0.34661296 0.8392470 0.26618165 0.7338183 8.043131e-02
## 15 8.199805e-03 0.29044842 0.3979353 0.44769069 0.5523093 -1.572423e-01
## 16 7.974757e-03 0.34208495 0.8762999 0.24538724 0.7546128 9.669772e-02
## 17 1.016052e-05 0.50008404 0.5008871 0.49962202 0.5003780 4.620248e-04
## 18 1.077733e-03 0.47310062 0.4945723 0.48988960 0.5101104 -1.678897e-02
## 19 4.555596e-03 0.43194344 0.9691885 0.23344930 0.7665507 1.984941e-01
## 20 1.797040e-03 0.40140320 0.4763702 0.46452988 0.5354701 -6.312668e-02
## 21 7.726297e-03 0.36613320 0.2079584 0.57897910 0.4210209 -2.128459e-01
## 22 7.537852e-03 0.33716485 1.0938415 0.12177914 0.8782209 2.153857e-01
## 23 5.078895e-04 0.48835953 0.5396067 0.47587226 0.5241277 1.248727e-02
## 24 8.673474e-03 0.34928915 1.0777076 0.13630052 0.8636995 2.129886e-01
## 25 6.743411e-03 0.28645508 0.2974439 0.49452509 0.5054749 -2.080700e-01
## 26 2.597985e-03 0.34630193 0.3301962 0.50785821 0.4921418 -1.615563e-01
## 27 7.946911e-03 0.32381835 0.9735062 0.18622698 0.8137730 1.375914e-01
## 28 3.132542e-03 0.37158284 0.4640124 0.45608357 0.5439164 -8.450073e-02
## 29 1.413325e-03 0.50486829 0.6852096 0.41406943 0.5859306 9.079887e-02
## 30 1.952905e-03 0.50803501 0.6558103 0.42980514 0.5701949 7.822987e-02
## 31 7.786354e-03 0.34741212 1.0685416 0.14103834 0.8589617 2.063738e-01
## 32 6.412179e-03 0.36399162 0.2144078 0.57461746 0.4253825 -2.106258e-01
## 33 8.813903e-03 0.14764207 0.4589496 0.34574908 0.6542509 -1.981070e-01
## 34 3.104395e-03 0.35538676 0.5085648 0.42745386 0.5725461 -7.206710e-02
## 35 1.494452e-03 0.50471073 0.6952247 0.40910457 0.5908954 9.560616e-02
## 36 1.979537e-03 0.43997236 0.5224390 0.46116787 0.5388321 -2.119551e-02
## 37 1.781772e-03 0.42523278 0.4282943 0.49854802 0.5014520 -7.331524e-02
## 38 8.631740e-04 0.49491100 0.5728496 0.46325836 0.5367416 3.165264e-02
## 39 2.624354e-03 0.46497177 0.6798731 0.39816848 0.6018315 6.680329e-02
## 40 7.278409e-03 0.34905395 1.0741076 0.13836237 0.8616376 2.106916e-01
## 41 9.198636e-03 0.21786352 0.3741723 0.42227101 0.5777290 -2.044075e-01
## 42 8.939710e-04 0.45949750 0.5303564 0.46664817 0.5333518 -7.150672e-03
## 43 5.755561e-03 0.32270764 0.3367562 0.49312027 0.5068797 -1.704126e-01
## 44 9.197598e-03 0.32806647 0.2496265 0.53913519 0.4608648 -2.110687e-01
## 45 7.835590e-03 0.20378477 0.7852617 0.22815772 0.7718423 -2.437296e-02
## 46 7.304276e-03 0.34955410 1.0730095 0.13921821 0.8607818 2.103359e-01
## 47 2.825585e-03 0.43352574 0.6371526 0.40405019 0.5959498 2.947555e-02
## 48 5.701607e-03 0.36363393 0.2181771 0.57250285 0.4274972 -2.088689e-01
## 49 9.403839e-03 0.14601780 0.6247003 0.27122861 0.7287714 -1.252108e-01
## 50 8.874280e-03 0.08319548 0.6259962 0.23775893 0.7622411 -1.545635e-01
## 51 5.856153e-03 0.35220670 0.2339843 0.55886949 0.4411305 -2.066628e-01
## 52 7.506319e-04 0.50195976 0.5572226 0.47395680 0.5260432 2.800295e-02
## 53 2.829871e-03 0.51333914 0.8552131 0.33161750 0.6683825 1.817216e-01
## 54 1.403796e-03 0.42963824 0.4600169 0.48563946 0.5143605 -5.600122e-02
## 55 2.256222e-03 0.50956487 0.7420472 0.38819990 0.6118001 1.213650e-01
## 56 8.706739e-03 0.32821696 1.0912943 0.11983024 0.8801698 2.083867e-01
## 57 6.495227e-04 0.51007559 0.5661376 0.47355873 0.5264413 3.651686e-02
## 58 7.423215e-03 0.46620740 0.7547751 0.36198130 0.6380187 1.042261e-01
## 59 9.409367e-03 0.12397287 0.5121628 0.30905282 0.6909472 -1.850800e-01
## 60 3.467645e-03 0.47043100 0.8983508 0.28929921 0.7107008 1.811318e-01
## 61 4.891585e-03 0.25235968 0.5896629 0.34011437 0.6598856 -8.775469e-02
## 62 5.191919e-05 0.49955438 0.5055161 0.49719380 0.5028062 2.360579e-03
## 63 6.960881e-04 0.52499283 0.6371783 0.44671365 0.5532863 7.827917e-02
## 64 3.234067e-03 0.43693087 0.5181214 0.46176043 0.5382396 -2.482957e-02
## 65 8.095405e-03 0.32338775 1.1079812 0.10778784 0.8922122 2.155999e-01
## 66 2.123864e-03 0.38804696 0.4229342 0.48337175 0.5166283 -9.532478e-02
## 67 3.309518e-03 0.36617643 0.4653326 0.45286598 0.5471340 -8.668955e-02
## 68 5.300329e-03 0.45369992 0.7757864 0.34578335 0.6542166 1.079166e-01
## 69 7.890242e-03 0.43151755 0.9045747 0.26894725 0.7310527 1.625703e-01
## 70 5.248723e-03 0.44718704 0.7585655 0.35144245 0.6485576 9.574459e-02
## 71 9.625057e-04 0.48690874 0.5426172 0.47377121 0.5262288 1.313752e-02
## 72 3.609097e-03 0.48364084 0.9192295 0.28373023 0.7162698 1.999106e-01
## 73 5.617329e-03 0.34033991 0.2579077 0.54093430 0.4590657 -2.005944e-01
## 74 9.237887e-03 0.26393288 0.3105145 0.47674268 0.5232573 -2.128098e-01
## 75 9.275353e-03 0.20156798 0.8823505 0.18190501 0.8180950 1.966296e-02
## 76 7.561670e-04 0.49760854 0.5883611 0.45717684 0.5428232 4.043169e-02
## 77 1.374263e-03 0.48128804 0.6314625 0.42902081 0.5709792 5.226723e-02
## 78 2.232129e-03 0.37084525 0.5174121 0.43073025 0.5692698 -5.988499e-02
## 79 7.759625e-03 0.19416064 0.7630441 0.23377557 0.7662244 -3.961493e-02
## 80 3.268253e-03 0.35954585 0.2702604 0.54401482 0.4559852 -1.844690e-01
## 81 5.423895e-03 0.32883003 0.3491396 0.49009377 0.5099062 -1.612637e-01
## 82 3.519797e-03 0.44627539 0.8133955 0.32336997 0.6766300 1.229054e-01
## 83 3.686690e-03 0.46329502 0.9091089 0.28031343 0.7196866 1.829816e-01
## 84 8.770650e-03 0.34686180 1.0804289 0.13370232 0.8662977 2.131595e-01
## 85 4.499834e-03 0.32020803 0.2749708 0.52248010 0.4775199 -2.022721e-01
## 86 6.913635e-03 0.45482424 0.7095723 0.37906282 0.6209372 7.576141e-02
## 87 7.423989e-03 0.38267169 0.9137441 0.24307479 0.7569252 1.395969e-01
## 88 9.184997e-03 0.32784987 1.1020920 0.11311855 0.8868814 2.147313e-01
## 89 9.934938e-04 0.53182177 0.6919863 0.42330347 0.5766965 1.085183e-01
## 90 7.108557e-03 0.41232879 0.6358961 0.39477003 0.6052300 1.755876e-02
## 91 6.307975e-03 0.35899737 1.0677312 0.14614680 0.8538532 2.128506e-01
## 92 5.444530e-03 0.36801075 1.0605666 0.15404688 0.8459531 2.139639e-01
## 93 5.708904e-03 0.40224834 0.9639685 0.22381750 0.7761825 1.784308e-01
## 94 7.141561e-03 0.26731143 0.3222452 0.47266606 0.5273339 -2.053546e-01
## 95 7.903713e-03 0.16504002 0.4725597 0.34873935 0.6512606 -1.836993e-01
## 96 5.645807e-03 0.39114706 1.0268661 0.18329898 0.8167010 2.078481e-01
## 97 3.539554e-03 0.49407722 0.8675384 0.31638410 0.6836159 1.776931e-01
## 98 2.396317e-03 0.52472965 0.8185411 0.35610951 0.6438905 1.686201e-01
## 99 3.785424e-03 0.31833590 0.3185359 0.49990155 0.5000984 -1.815657e-01
## 100 6.899727e-03 0.34665472 0.8118079 0.27989326 0.7201067 6.676147e-02
## 101 1.963958e-03 0.38847647 0.4653263 0.46355690 0.5364431 -7.508043e-02
## 102 4.301069e-03 0.46970545 0.6283353 0.42510979 0.5748902 4.459566e-02
## 103 8.824290e-03 0.44210574 0.1264228 0.65781855 0.3421815 -2.157128e-01
## 104 9.245072e-03 0.29598198 1.1344336 0.08099374 0.9190063 2.149882e-01
## 105 7.604964e-03 0.24465042 0.3562688 0.44460738 0.5553926 -1.999570e-01
## 106 7.759268e-04 0.45320401 0.4823022 0.48628348 0.5137165 -3.307947e-02
## 107 6.426895e-03 0.36017732 0.5030301 0.43233587 0.5676641 -7.215855e-02
## 108 5.150249e-03 0.34234836 0.2619044 0.53989146 0.4601085 -1.975431e-01
## 109 5.158771e-03 0.38924124 0.7550976 0.32689702 0.6731030 6.234423e-02
## 110 7.247160e-03 0.48560850 0.7937028 0.35114885 0.6488512 1.344596e-01
## 111 7.664692e-03 0.27774016 0.3016068 0.48809683 0.5119032 -2.103567e-01
## 112 4.033598e-03 0.35902291 0.7016212 0.33886170 0.6611383 2.016121e-02
## 113 8.610544e-03 0.29051769 0.2822052 0.50415187 0.4958481 -2.136342e-01
## 114 9.173485e-03 0.27410778 0.9733603 0.16627345 0.8337265 1.078343e-01
## 115 2.312141e-03 0.51128193 0.7527714 0.38361570 0.6163843 1.276662e-01
## 116 5.785912e-03 0.40348506 1.0217406 0.19141214 0.8085879 2.120729e-01
## 117 3.133029e-03 0.50150728 0.8249307 0.34222266 0.6577773 1.592846e-01
## 118 3.027803e-04 0.49290497 0.5075815 0.49309175 0.5069082 -1.867789e-04
## 119 6.494774e-04 0.46052418 0.4682542 0.49635496 0.5036450 -3.583079e-02
## 120 2.627321e-03 0.51441106 0.8032531 0.35933661 0.6406634 1.550744e-01
## 121 6.300118e-03 0.38606905 1.0151758 0.18797870 0.8120213 1.980903e-01
## 122 5.009005e-03 0.39455986 0.5113978 0.44484464 0.5551554 -5.028477e-02
## 123 8.546357e-03 0.36682709 0.9593036 0.21165655 0.7883434 1.551705e-01
## 124 5.935042e-03 0.36343477 1.0640667 0.15011579 0.8498842 2.133190e-01
## 125 5.670056e-05 0.49996437 0.5053768 0.49745235 0.5025477 2.512029e-03
## 126 1.956694e-04 0.49743770 0.5190521 0.48982516 0.5101748 7.612538e-03
## 127 3.491569e-03 0.36763703 0.4826408 0.44544987 0.5545501 -7.781284e-02
## 128 6.018842e-03 0.25616395 0.5745515 0.34884931 0.6511507 -9.268536e-02
## 129 2.453778e-03 0.42789177 0.6552214 0.39282704 0.6071730 3.506474e-02
## 130 3.330195e-03 0.45417300 0.7229730 0.37220860 0.6277914 8.196439e-02
## 131 4.568058e-04 0.49890140 0.5417205 0.47983383 0.5201662 1.906758e-02
## 132 1.878873e-03 0.49715239 0.6752411 0.41533270 0.5846673 8.181969e-02
## 133 7.274750e-03 0.36343765 1.0385281 0.16518550 0.8348145 1.982521e-01
## 134 8.055270e-03 0.17014297 0.5542951 0.31464738 0.6853526 -1.445044e-01
## 135 7.918719e-03 0.35004282 0.7405543 0.31614324 0.6838568 3.389958e-02
## 136 1.613960e-03 0.44481819 0.5890183 0.43212122 0.5678788 1.269697e-02
## 137 4.043005e-03 0.45292968 0.7853295 0.34062799 0.6593720 1.123017e-01
## 138 2.836492e-03 0.36867880 0.4335521 0.46904439 0.5309556 -1.003656e-01
## 139 8.648536e-03 0.40487846 0.8830274 0.26894402 0.7310560 1.359344e-01
## 140 7.121030e-03 0.40200479 1.0056062 0.20009305 0.7999069 2.019117e-01
## 141 7.015624e-03 0.50187202 0.8437297 0.33252488 0.6674751 1.693471e-01
## 142 2.042604e-03 0.44644705 0.5396346 0.45613989 0.5438601 -9.692835e-03
## 143 7.276373e-03 0.27335900 0.3110216 0.48123768 0.5187623 -2.078787e-01
## 144 8.504937e-03 0.28247500 1.1493787 0.06658533 0.9334147 2.158897e-01
## 145 9.535921e-03 0.40888960 0.9714838 0.22238811 0.7776119 1.865015e-01
## 146 8.545091e-03 0.32920752 0.2406715 0.54424876 0.4557512 -2.150412e-01
## 147 2.254398e-03 0.37776169 0.4714294 0.45556223 0.5444378 -7.780054e-02
## 148 5.514651e-03 0.27258786 0.5631959 0.36208390 0.6379161 -8.949604e-02
## 149 6.254560e-03 0.37577569 1.0434211 0.16731353 0.8326865 2.084622e-01
## 150 6.128050e-03 0.46189330 0.6907315 0.39148591 0.6085141 7.040738e-02
## 151 1.952048e-03 0.39256306 0.4730381 0.46188246 0.5381175 -6.931940e-02
## 152 8.239200e-03 0.33030051 0.7244088 0.31481486 0.6851851 1.548565e-02
## 153 4.212187e-03 0.32458121 0.2727712 0.52573342 0.4742666 -2.011522e-01
## 154 6.562633e-03 0.32255966 0.2521844 0.53513468 0.4648653 -2.125750e-01
## 155 8.529452e-05 0.49978514 0.5056392 0.49724448 0.5027555 2.540662e-03
## 156 4.627415e-03 0.30253554 0.3171601 0.49277353 0.5072265 -1.902380e-01
## 157 7.506022e-03 0.19114391 0.7362697 0.24439862 0.7556014 -5.325471e-02
## 158 5.802968e-03 0.36849394 0.2110729 0.57850610 0.4214939 -2.100122e-01
## 159 8.889093e-03 0.13810223 0.4959942 0.32384897 0.6761510 -1.857467e-01
## 160 3.338891e-03 0.35704116 0.2980883 0.52889685 0.4711032 -1.718557e-01
## 161 5.739428e-03 0.29183838 0.3035602 0.49417525 0.5058248 -2.023369e-01
## 162 9.051019e-03 0.24618906 0.9294580 0.17769349 0.8223065 6.849557e-02
## 163 7.187216e-03 0.44810200 0.9357919 0.25904055 0.7409594 1.890615e-01
## 164 2.371262e-03 0.37102321 0.2899472 0.53968910 0.4603109 -1.686659e-01
## 165 5.791201e-03 0.33183326 0.7032186 0.32554605 0.6744539 6.287213e-03
## 166 5.959915e-03 0.39382630 0.9629484 0.22086063 0.7791394 1.729657e-01
## 167 8.379680e-03 0.25726560 0.7659283 0.26171973 0.7382803 -4.454133e-03
## 168 8.564844e-03 0.32893623 0.2510775 0.53882493 0.4611751 -2.098887e-01
## 169 1.064177e-03 0.50320852 0.5820377 0.46280348 0.5371965 4.040504e-02
## 170 6.110630e-03 0.23336248 0.5255228 0.35980801 0.6401920 -1.264455e-01
## 171 1.771706e-03 0.52165759 0.6221198 0.45237437 0.5476256 6.928322e-02
## 172 3.746941e-03 0.42731642 0.5216066 0.45558317 0.5444168 -2.826674e-02
## 173 8.344937e-03 0.25568751 0.5881512 0.34243236 0.6575676 -8.674485e-02
## 174 8.671874e-03 0.14356052 0.4964636 0.32654393 0.6734561 -1.829834e-01
## 175 5.165876e-03 0.29467706 0.4293389 0.43492929 0.5650707 -1.402522e-01
## 176 6.250491e-03 0.26256080 0.3704989 0.44683054 0.5531695 -1.842697e-01
## 177 5.663535e-03 0.47401068 0.8621305 0.31031827 0.6896817 1.636924e-01
## 178 8.189466e-03 0.32238236 0.2483328 0.53700190 0.4629981 -2.146195e-01
## 179 5.172787e-03 0.37674492 0.6194590 0.38587044 0.6141296 -9.125522e-03
## 180 2.048906e-03 0.51888448 0.6288528 0.44784828 0.5521517 7.103619e-02
## 181 6.680525e-03 0.31019439 0.3270606 0.49169932 0.5083007 -1.815049e-01
## 182 4.062967e-03 0.32344469 0.4156347 0.45557047 0.5444295 -1.321258e-01
## 183 8.424910e-03 0.28920324 0.3299450 0.47986579 0.5201342 -1.906626e-01
## 184 7.709358e-03 0.31518467 0.2788501 0.51806082 0.4819392 -2.028761e-01
## 185 2.544983e-03 0.36650172 0.4030771 0.48246199 0.5175380 -1.159603e-01
## 186 5.364966e-03 0.50714386 0.7578392 0.37916456 0.6208354 1.279793e-01
## 187 5.934410e-04 0.49408188 0.5305318 0.48283964 0.5171604 1.124224e-02
## 188 5.020772e-05 0.50207164 0.5088920 0.49678951 0.5032105 5.282129e-03
## 189 2.873655e-03 0.52784553 0.6870686 0.42385741 0.5761426 1.039881e-01
## 190 5.514606e-03 0.30662414 0.2813504 0.51258028 0.4874197 -2.059561e-01
## 191 2.057597e-03 0.41814271 0.5359939 0.44449899 0.5555010 -2.635628e-02
## 192 8.173496e-03 0.15968134 0.5246346 0.32242353 0.6775765 -1.627422e-01
## 193 2.086392e-03 0.43346741 0.5171345 0.46058843 0.5394116 -2.712102e-02
## 194 3.212343e-03 0.46856248 0.8320487 0.32370124 0.6762988 1.448612e-01
## 195 7.999160e-03 0.22223277 0.4232671 0.40126720 0.5987328 -1.790344e-01
## 196 9.251449e-07 0.49996937 0.5000287 0.49997206 0.5000279 -2.691577e-06
## 197 2.268155e-03 0.45362669 0.6246516 0.41936319 0.5806368 3.426350e-02
## 198 7.367501e-03 0.37636973 0.8968109 0.24939865 0.7506013 1.269711e-01
## 199 2.263759e-03 0.37305012 0.2949577 0.53817009 0.4618299 -1.651200e-01
## 200 3.956566e-03 0.46982359 0.9399072 0.26622585 0.7337742 2.035977e-01
## e_dual_0
## 1 2.087761e-01
## 2 2.070398e-01
## 3 -4.753433e-03
## 4 5.273141e-02
## 5 -2.083042e-01
## 6 -6.772559e-02
## 7 -1.117670e-01
## 8 2.122746e-01
## 9 1.186624e-01
## 10 -1.365677e-02
## 11 2.088203e-01
## 12 -7.327537e-02
## 13 1.975676e-01
## 14 1.054286e-01
## 15 -1.543740e-01
## 16 1.216871e-01
## 17 5.090779e-04
## 18 -1.553812e-02
## 19 2.026378e-01
## 20 -5.909996e-02
## 21 -2.130625e-01
## 22 2.156207e-01
## 23 1.547896e-02
## 24 2.140081e-01
## 25 -2.080310e-01
## 26 -1.619456e-01
## 27 1.597331e-01
## 28 -7.990404e-02
## 29 9.927906e-02
## 30 8.561544e-02
## 31 2.095800e-01
## 32 -2.109747e-01
## 33 -1.953013e-01
## 34 -6.398138e-02
## 35 1.043293e-01
## 36 -1.639315e-02
## 37 -7.315768e-02
## 38 3.610795e-02
## 39 7.804157e-02
## 40 2.124700e-01
## 41 -2.035567e-01
## 42 -2.995390e-03
## 43 -1.701235e-01
## 44 -2.112383e-01
## 45 1.341938e-02
## 46 2.122277e-01
## 47 4.120279e-02
## 48 -2.093201e-01
## 49 -1.040711e-01
## 50 -1.362448e-01
## 51 -2.071462e-01
## 52 3.117943e-02
## 53 1.868306e-01
## 54 -5.434368e-02
## 55 1.302471e-01
## 56 2.111246e-01
## 57 3.969636e-02
## 58 1.167564e-01
## 59 -1.787844e-01
## 60 1.876500e-01
## 61 -7.022273e-02
## 62 2.709861e-03
## 63 8.389191e-02
## 64 -2.011821e-02
## 65 2.157690e-01
## 66 -9.369404e-02
## 67 -8.180145e-02
## 68 1.215698e-01
## 69 1.735219e-01
## 70 1.100080e-01
## 71 1.638841e-02
## 72 2.029597e-01
## 73 -2.011580e-01
## 74 -2.127428e-01
## 75 6.425551e-02
## 76 4.553798e-02
## 77 6.048327e-02
## 78 -5.185763e-02
## 79 -3.180358e-03
## 80 -1.857248e-01
## 81 -1.607666e-01
## 82 1.367655e-01
## 83 1.894223e-01
## 84 2.141312e-01
## 85 -2.025491e-01
## 86 8.863514e-02
## 87 1.568188e-01
## 88 2.152105e-01
## 89 1.152898e-01
## 90 3.066611e-02
## 91 2.138780e-01
## 92 2.146135e-01
## 93 1.877860e-01
## 94 -2.050887e-01
## 95 -1.787009e-01
## 96 2.101650e-01
## 97 1.839225e-01
## 98 1.746506e-01
## 99 -1.815625e-01
## 100 9.170119e-02
## 101 -7.111679e-02
## 102 5.344510e-02
## 103 -2.157587e-01
## 104 2.154274e-01
## 105 -1.991238e-01
## 106 -3.141428e-02
## 107 -6.463398e-02
## 108 -1.982041e-01
## 109 8.199463e-02
## 110 1.448517e-01
## 111 -2.102963e-01
## 112 4.048288e-02
## 113 -2.136430e-01
## 114 1.396337e-01
## 115 1.363871e-01
## 116 2.131528e-01
## 117 1.671533e-01
## 118 6.732522e-04
## 119 -3.539087e-02
## 120 1.625898e-01
## 121 2.031546e-01
## 122 -4.375760e-02
## 123 1.709601e-01
## 124 2.141825e-01
## 125 2.829124e-03
## 126 8.877257e-03
## 127 -7.190928e-02
## 128 -7.659921e-02
## 129 4.804841e-02
## 130 9.518159e-02
## 131 2.155435e-02
## 132 9.057382e-02
## 133 2.037136e-01
## 134 -1.310576e-01
## 135 5.669753e-02
## 136 2.113953e-02
## 137 1.259575e-01
## 138 -9.740354e-02
## 139 1.519715e-01
## 140 2.056993e-01
## 141 1.762546e-01
## 142 -4.225522e-03
## 143 -2.077407e-01
## 144 2.159640e-01
## 145 1.938719e-01
## 146 -2.150798e-01
## 147 -7.300837e-02
## 148 -7.472020e-02
## 149 2.107346e-01
## 150 8.221738e-02
## 151 -6.507947e-02
## 152 3.922368e-02
## 153 -2.014954e-01
## 154 -2.126809e-01
## 155 2.883628e-03
## 156 -1.900663e-01
## 157 -1.933165e-02
## 158 -2.104210e-01
## 159 -1.801568e-01
## 160 -1.730148e-01
## 161 -2.022645e-01
## 162 1.071515e-01
## 163 1.948325e-01
## 164 -1.703637e-01
## 165 2.876469e-02
## 166 1.838091e-01
## 167 2.764807e-02
## 168 -2.100975e-01
## 169 4.484123e-02
## 170 -1.146692e-01
## 171 7.449420e-02
## 172 -2.281027e-02
## 173 -6.941641e-02
## 174 -1.769924e-01
## 175 -1.357318e-01
## 176 -1.826705e-01
## 177 1.724487e-01
## 178 -2.146653e-01
## 179 5.329423e-03
## 180 7.670112e-02
## 181 -1.812400e-01
## 182 -1.287948e-01
## 183 -1.901892e-01
## 184 -2.030891e-01
## 185 -1.144609e-01
## 186 1.370038e-01
## 187 1.337148e-02
## 188 5.681505e-03
## 189 1.109260e-01
## 190 -2.060693e-01
## 191 -1.950714e-02
## 192 -1.529419e-01
## 193 -2.227710e-02
## 194 1.557500e-01
## 195 -1.754657e-01
## 196 7.861760e-07
## 197 4.401479e-02
## 198 1.462095e-01
## 199 -1.668722e-01
## 200 2.061330e-01
##
## $values
## $values$entropy
## [1] 393.749
##
## $values$iterations
## [1] 96
##
## $values$message
## [1] "relative convergence (4)"
##
##
## $tol
## [1] 1e-10
##
## $v
## [,1] [,2] [,3]
## [1,] 0.2160606 0 -0.2160606
##
## $lambda
## (Intercept) Dcollege Totalincome Dunemp
## 1 1925.471 2117.909 -0.008238336 -485.6150
## 0 2092.314 2267.589 -0.008558389 -539.5005
##
## $checkrestrictions
## $checkrestrictions$g1
## [,1]
## [1,] 0
## [2,] 0
## [3,] 0
## [4,] 0
## [5,] 0
## [6,] 0
## [7,] 0
## [8,] 0
## [9,] 0
## [10,] 0
## [11,] 0
## [12,] 0
## [13,] 0
## [14,] 0
## [15,] 0
## [16,] 0
## [17,] 0
## [18,] 0
## [19,] 0
## [20,] 0
## [21,] 0
## [22,] 0
## [23,] 0
## [24,] 0
## [25,] 0
## [26,] 0
## [27,] 0
## [28,] 0
## [29,] 0
## [30,] 0
## [31,] 0
## [32,] 0
## [33,] 0
## [34,] 0
## [35,] 0
## [36,] 0
## [37,] 0
## [38,] 0
## [39,] 0
## [40,] 0
## [41,] 0
## [42,] 0
## [43,] 0
## [44,] 0
## [45,] 0
## [46,] 0
## [47,] 0
## [48,] 0
## [49,] 0
## [50,] 0
## [51,] 0
## [52,] 0
## [53,] 0
## [54,] 0
## [55,] 0
## [56,] 0
## [57,] 0
## [58,] 0
## [59,] 0
## [60,] 0
## [61,] 0
## [62,] 0
## [63,] 0
## [64,] 0
## [65,] 0
## [66,] 0
## [67,] 0
## [68,] 0
## [69,] 0
## [70,] 0
## [71,] 0
## [72,] 0
## [73,] 0
## [74,] 0
## [75,] 0
## [76,] 0
## [77,] 0
## [78,] 0
## [79,] 0
## [80,] 0
## [81,] 0
## [82,] 0
## [83,] 0
## [84,] 0
## [85,] 0
## [86,] 0
## [87,] 0
## [88,] 0
## [89,] 0
## [90,] 0
## [91,] 0
## [92,] 0
## [93,] 0
## [94,] 0
## [95,] 0
## [96,] 0
## [97,] 0
## [98,] 0
## [99,] 0
## [100,] 0
## [101,] 0
## [102,] 0
## [103,] 0
## [104,] 0
## [105,] 0
## [106,] 0
## [107,] 0
## [108,] 0
## [109,] 0
## [110,] 0
## [111,] 0
## [112,] 0
## [113,] 0
## [114,] 0
## [115,] 0
## [116,] 0
## [117,] 0
## [118,] 0
## [119,] 0
## [120,] 0
## [121,] 0
## [122,] 0
## [123,] 0
## [124,] 0
## [125,] 0
## [126,] 0
## [127,] 0
## [128,] 0
## [129,] 0
## [130,] 0
## [131,] 0
## [132,] 0
## [133,] 0
## [134,] 0
## [135,] 0
## [136,] 0
## [137,] 0
## [138,] 0
## [139,] 0
## [140,] 0
## [141,] 0
## [142,] 0
## [143,] 0
## [144,] 0
## [145,] 0
## [146,] 0
## [147,] 0
## [148,] 0
## [149,] 0
## [150,] 0
## [151,] 0
## [152,] 0
## [153,] 0
## [154,] 0
## [155,] 0
## [156,] 0
## [157,] 0
## [158,] 0
## [159,] 0
## [160,] 0
## [161,] 0
## [162,] 0
## [163,] 0
## [164,] 0
## [165,] 0
## [166,] 0
## [167,] 0
## [168,] 0
## [169,] 0
## [170,] 0
## [171,] 0
## [172,] 0
## [173,] 0
## [174,] 0
## [175,] 0
## [176,] 0
## [177,] 0
## [178,] 0
## [179,] 0
## [180,] 0
## [181,] 0
## [182,] 0
## [183,] 0
## [184,] 0
## [185,] 0
## [186,] 0
## [187,] 0
## [188,] 0
## [189,] 0
## [190,] 0
## [191,] 0
## [192,] 0
## [193,] 0
## [194,] 0
## [195,] 0
## [196,] 0
## [197,] 0
## [198,] 0
## [199,] 0
## [200,] 0
##
## $checkrestrictions$g2
## [,1] [,2]
## [1,] 0 0
## [2,] 0 0
## [3,] 0 0
## [4,] 0 0
## [5,] 0 0
## [6,] 0 0
## [7,] 0 0
## [8,] 0 0
## [9,] 0 0
## [10,] 0 0
## [11,] 0 0
## [12,] 0 0
## [13,] 0 0
## [14,] 0 0
## [15,] 0 0
## [16,] 0 0
## [17,] 0 0
## [18,] 0 0
## [19,] 0 0
## [20,] 0 0
## [21,] 0 0
## [22,] 0 0
## [23,] 0 0
## [24,] 0 0
## [25,] 0 0
## [26,] 0 0
## [27,] 0 0
## [28,] 0 0
## [29,] 0 0
## [30,] 0 0
## [31,] 0 0
## [32,] 0 0
## [33,] 0 0
## [34,] 0 0
## [35,] 0 0
## [36,] 0 0
## [37,] 0 0
## [38,] 0 0
## [39,] 0 0
## [40,] 0 0
## [41,] 0 0
## [42,] 0 0
## [43,] 0 0
## [44,] 0 0
## [45,] 0 0
## [46,] 0 0
## [47,] 0 0
## [48,] 0 0
## [49,] 0 0
## [50,] 0 0
## [51,] 0 0
## [52,] 0 0
## [53,] 0 0
## [54,] 0 0
## [55,] 0 0
## [56,] 0 0
## [57,] 0 0
## [58,] 0 0
## [59,] 0 0
## [60,] 0 0
## [61,] 0 0
## [62,] 0 0
## [63,] 0 0
## [64,] 0 0
## [65,] 0 0
## [66,] 0 0
## [67,] 0 0
## [68,] 0 0
## [69,] 0 0
## [70,] 0 0
## [71,] 0 0
## [72,] 0 0
## [73,] 0 0
## [74,] 0 0
## [75,] 0 0
## [76,] 0 0
## [77,] 0 0
## [78,] 0 0
## [79,] 0 0
## [80,] 0 0
## [81,] 0 0
## [82,] 0 0
## [83,] 0 0
## [84,] 0 0
## [85,] 0 0
## [86,] 0 0
## [87,] 0 0
## [88,] 0 0
## [89,] 0 0
## [90,] 0 0
## [91,] 0 0
## [92,] 0 0
## [93,] 0 0
## [94,] 0 0
## [95,] 0 0
## [96,] 0 0
## [97,] 0 0
## [98,] 0 0
## [99,] 0 0
## [100,] 0 0
## [101,] 0 0
## [102,] 0 0
## [103,] 0 0
## [104,] 0 0
## [105,] 0 0
## [106,] 0 0
## [107,] 0 0
## [108,] 0 0
## [109,] 0 0
## [110,] 0 0
## [111,] 0 0
## [112,] 0 0
## [113,] 0 0
## [114,] 0 0
## [115,] 0 0
## [116,] 0 0
## [117,] 0 0
## [118,] 0 0
## [119,] 0 0
## [120,] 0 0
## [121,] 0 0
## [122,] 0 0
## [123,] 0 0
## [124,] 0 0
## [125,] 0 0
## [126,] 0 0
## [127,] 0 0
## [128,] 0 0
## [129,] 0 0
## [130,] 0 0
## [131,] 0 0
## [132,] 0 0
## [133,] 0 0
## [134,] 0 0
## [135,] 0 0
## [136,] 0 0
## [137,] 0 0
## [138,] 0 0
## [139,] 0 0
## [140,] 0 0
## [141,] 0 0
## [142,] 0 0
## [143,] 0 0
## [144,] 0 0
## [145,] 0 0
## [146,] 0 0
## [147,] 0 0
## [148,] 0 0
## [149,] 0 0
## [150,] 0 0
## [151,] 0 0
## [152,] 0 0
## [153,] 0 0
## [154,] 0 0
## [155,] 0 0
## [156,] 0 0
## [157,] 0 0
## [158,] 0 0
## [159,] 0 0
## [160,] 0 0
## [161,] 0 0
## [162,] 0 0
## [163,] 0 0
## [164,] 0 0
## [165,] 0 0
## [166,] 0 0
## [167,] 0 0
## [168,] 0 0
## [169,] 0 0
## [170,] 0 0
## [171,] 0 0
## [172,] 0 0
## [173,] 0 0
## [174,] 0 0
## [175,] 0 0
## [176,] 0 0
## [177,] 0 0
## [178,] 0 0
## [179,] 0 0
## [180,] 0 0
## [181,] 0 0
## [182,] 0 0
## [183,] 0 0
## [184,] 0 0
## [185,] 0 0
## [186,] 0 0
## [187,] 0 0
## [188,] 0 0
## [189,] 0 0
## [190,] 0 0
## [191,] 0 0
## [192,] 0 0
## [193,] 0 0
## [194,] 0 0
## [195,] 0 0
## [196,] 0 0
## [197,] 0 0
## [198,] 0 0
## [199,] 0 0
## [200,] 0 0
##
## $checkrestrictions$g3
## 1 0
## (Intercept) 0.000 0.00
## Dcollege 0.000 0.00
## Totalincome -0.031 0.01
## Dunemp 0.000 0.00
##
##
## $cross_moments_hp
## 1 0
## (Intercept) 0.34 0.66
## Dcollege 0.17 0.44
## Totalincome 103036.63 189594.78
## Dunemp 0.16 0.29
##
## $cross_moments_hs
## 1 0
## (Intercept) 0.34 0.66
## Dcollege 0.17 0.44
## Totalincome 103036.67 189594.77
## Dunemp 0.16 0.29
##
## $J
## [1] 2
##
## $fn
## datahp$poor_liq ~ Dcollege + Totalincome + Dunemp
##
## $divergencekl
## [1] 13.52074
##
## attr(,"class")
## [1] "shannon"
To make the results more visual, this package includes a personalized summary function which will resume the main results, providing the means for each category j for the predictions, the probabilities and the error.
## Iterations[1] 96
## Entropy value[1] 393.749
## [1] 13.52074
## [1] "mean_estimations"
## weights predictions_1 predictions_0 p_dual_1 p_dual_0 e_dual_1
## 1 0.006608031 0.3377784 0.6622217 0.3420553 0.6579447 -0.004276907
## e_dual_0
## 1 0.004276958
## [1] "lambda"
## (Intercept) Dcollege Totalincome Dunemp
## 1 1925.471 2117.909 -0.008238336 -485.6150
## 0 2092.314 2267.589 -0.008558389 -539.5005
Graphs are generated with the plot function, showing the averages of the predictions for each territorial unit and the 95% confidence interval associated with each of them.
Fernandez-Vazquez, E., Díaz-Dapena, A., Rubiera-Morollon, F., Viñuela, A., (2020) Spatial Disaggregation of Social Indicators: An Info-Metrics Approach. Social Indicators Research, 152(2), 809–821. https://doi.org/10.1007/s11205-020-02455-z.