Method for the estimation of institutional quality indexes using fuzzy logic

This paper presents a method to estimate institutional environment indexes using fuzzy modeling. Because of the complexity of the subject, institution, elements associated with this thinking are difficult to measure and compare. In order to address this problem, this research presents how a fuzzy inference system works and how to create institutional indexes from it. While methods that analyze institutional environments generally use secondary data from countries or regions provided by international organizations, the illustrative case applied to aquaculture in Brazil demonstrates the effectiveness of using this method to generate indexes related to the subject from primary data collected at the firm level. Furthermore, the combined use of this method with others already used in the institutional literature can be valuable both for researchers and public policy makers who seek to increasingly understand the role of institutions in economic performance.• Uses a Mamdani expert system of MIMO type to estimate institutional indexes.• Institutional ambient scores related to tilapia production in Brazil are presented.• The combined use of the method with others can be valuable for the research field.


Method overview
Institutions have broad concepts that render them difficult to define and are used by several research fields, such as economics, philosophy, sociology, politics, and geography. Even today, its complexity provides conflicting definitions [1] . The literature reveals a list of analytical elements that are difficult to measure or compare given their intrinsic qualitative nature and, therefore, involve a certain degree of human judgment, for example, quality of policies and laws, contract and property rights enforcement, norms, customs, tradition, power, leadership, trust, reciprocity, and access and availability of resources [2] .
In order to address this problem, this study presents a novel method for estimating institutional environment indexes using fuzzy modeling in four perspectives (relational, economic, social, and local) applied in an illustrative case of Brazilian aquaculture. This method allows modeling different indicators and indexes that can be used in conjunction with other methods to help measure the role of institutions in economic performance.
As demonstrated in the case applied, this model has the particular ability to process data and information collected at the firm level (micro-level). This expands the field of research of institutions beyond the usual institutional analyses that use secondary data (usually provided by international organizations) and are oriented to analysis at the level of countries and regions [3][4][5] . Parallel to this, the use of fuzzy systems in this field can also be significantly useful to (re)shape the proxies used as inputs in econometric models such valuable and widely applied to measure the impact of institutions on economy [6][7][8][9] .

Database and study area
The data were collected in Brazil, in the first quarter of 2019, through a survey directly answered by tilapia production units (TPUs), in the states of São Paulo (SP) and Mato Grosso do Sul (MS). In total, 36 TPUs answered the questionnaire, 19 of them delimited to the productive zone of Ilha Solteira (SP/MS) and the remaining 17 in 11 other cities of São Paulo; therefore the data were tabulated and processed as two different groups: Ilha Solteira and others of São Paulo ( Fig. 1 ).
Due to a methodological issue related to the size of the system (which will be presented further), we have defined four contexts of institutional analysis in this research: (1) Relational, (2) Economic, (3) Social and (4) Local. The first was based on one of the three dimensions of social capital, which applied to the scope of firms proposed by Tsai and Ghoshal [10] . 1 Thus, we seek to insert in the model, more directly, relational aspects inherently immersed in the institutional field. The other three contexts were based on the synthetic parameters of the 'Local Institutional Context' analytical dimension proposed by Gereffi and Fernández-Stark [11] for the analysis of Global Value Chains (GVC), and also in the Miranda and Wagner [12] , Dollar et al. [13] Dollar and Kidder [14] studies. Table 1 presents these four contexts, with their respective indicators described.  Evaluation of impact level of the process to obtain the cession of union water use as a barrier to activity Public Safety SegPub Evaluation of impact level of public safety as a barrier to activity  Regarding the complexity of the subject institutions, the use of four contexts and twelve indicators described in this research do not seek to delimit everything that surrounds this phenomenon, but rather to point out practical definitions for empirical analysis in aquaculture.

Method details: The configuration and functioning of the fuzzy inference system
The Iranian mathematician Lofti Asker Zadeh with the publication of the article "Fuzzy Sets" first introduced the fuzzy sets theory in 1965. In this, the mathematician sought to solve the problem of the imprecision of the human mind. By Zadeh's theoretical proposition, a fuzzy "A" set defined in the universe of "X" discourse is characterized by a membership function, which maps the elements of X to the interval [0,1] [15] .
Thus, the membership function associated with each "x" element belonging to "X is an realnumber in the interval [0,1] that represents the degree of membership (adherence) of the "x" element to the set "A" for each ( Fig. 2 ).
Fuzzy set theory is used by fuzzy logic to extend traditional bi-value logic (true or false, yes or no, and so forth) assuming that the true values are nebulous sets defined in the range 0-1. What makes fuzzy logic powerful is its ability to model human thought, since it uses approximate reasoning instead of precise reasoning. This logic provides a significant contribution to research using unclear data, often expressed in linguistic terms, and quite close to human perception [16] .
In recent decades, fuzzy logic and fuzzy systems have been widely adopted in the scientific community, since they are input-output models where input variables do not have exact values, but present influential probabilities of each variable on the final outcome [17] .
A Fuzzy Inference System (FIS) is a system that maps inputs and processes them based on preestablished rules producing outputs. The architecture of this system can divide into four key elements: fuzzification, rules base, fuzzy inference and defuzzification [18] .
Synthetically a FIS can also be understood as an inference process based on fuzzy rules (or approximate reasoning) of the "IF-THEN" type, which connects antecedents and consequents, making use of membership functions and fuzzy operators [19] . Fig. 3 represents the main elements of a FIS. In the fuzzing stage, crisp values translated into fuzzy values, which are determined by the degrees of adherence to the membership functions that are in turn connected to the linguistic variables. The rule base is a structure of linguistic statements of the type "IF-THEN" that stocks all the knowledge of the system. In the inference module, the fuzzy  values obtained and processed by inference methods, where operations of implication, composition and aggregation of rules occur. Finally, defuzzification transforms, through different techniques, the aggregation results of the previous step into crisp values [ 20 , 21 ].
For research purposes, two fuzzy expert systems were implemented with the support of MATLAB® R2018a software. The fuzzy expert system is the most popular of the knowledge-based systems, where knowledge is described by a set of instructions, for example, IF-THEN rules. IF-THEN rule systems are most widely used in the processing and representing fuzzy knowledge [22] .
Each one of the two FIS contains six inputs and two outputs, FIS 1 is composed of the inputs relating to the relational and economic context ( Fig. 4 ), and the FIS 2 of the inputs relating to the social and local context ( Fig. 5 ). The two systems generate four outputs that represent indexes of the institutional environment of tilapia farming in their respective contexts.
As previously mentioned, the choice of using four analytical contexts for the institutional environment was due to operational issues of model size. If we chose to use in a single FIS all twelve inputs (without division into contexts) with a single output (representing a single institutional environment index) the total of rules at the base of the system would be enormous, with more than 194,0 0 0 rules. This methodological alternative of fuzzy sub-indexes using two FIS also facilitates the operational work of inserting a large number of rules into the software.
In this research, given the characteristics of the indicators and the linguistic variables associated with them, the FIS inputs have taken on triangular and singleton membership function (MF) forms. The outputs took on strictly triangular functions. Eqs. (1) and 2 represent these two kinds of MFs, with parameters (a,m,b), being a ≤ m ≤ b , with a, m, b and x belonging to the universe set U.
According to the characteristics of each input and output of the systems, the functions connected to the linguistic terms are: Very Low (VL), Low (L), Medium (M), High (H) and Very High (VH). The transformation of the previous and consequent linguistic terms into fuzzy numbers through the MFs are represented in Tables 2 and 3 , respectively.
Rules bases of MIMO (Multiple-Input/Multiple-Output) type were used, composed by IF-THEN rules, having a previous part (premise) and consequent part (conclusion) connected by the logical connective (operator) "AND", as shown in Table 4 . The definition of the rules base, a central part of FIS, was constituted from deductive logical reasoning based on economic analysis and the literature of the social capital [ 23 , 24 ] and transaction cost economics [25] . It is important to highlight that with MATLAB®, it is possible to assign different weights to each of the inserted rules, which gives a greater possibility of customization of the system. No weights were set in this illustrative case, so all the rules had the same importance for the generation of the indexes. Table 5 shown the general causal mechanism between indicators and institutional environment.  Table 4 presents the rules used for FRI in FIS 1, while Table 6 summarizes the 85 rules used for both FIS.
When using rule bases such as those described above, conclusions should be based on all rules, thus making it necessary to aggregate all individual relationships into one set of rules. For this aggregation, several methods are used. However, most methods applied are Geramian et al. [20] .
Although it is possible to apply either method through the MATLAB® software, the Mamdani [26] method was chosen for this illustrative case, for two reasons. Firstly, the fuzzy output of the system is accompanied by the membership function, which for this article leaves the presentation of results more intuitive, in the method of Sugeno this does not happen. The second factor is that the chosen method supports MIMO watering systems, while the other only MISO (Multiple-Input/Single-Output) 2 .
When there are multiple precedents applied to a rule, the fuzzy operator (i.e., AND, OR, NOT) is used to obtain a single number that represents the result of the previous evaluation. To evaluate the disjunction (intersection) of the rule of precedent, the fuzzy operation "AND" is used, in an analogous way for conjunction (union), the operator "OR" is used, while for complement (complement) the operator is "NOT" [27] . These are expressed by the operations, where s is a S-norm and t is a T-norm: 2 For an illustrative case of comparison between the use of the two methods and a synthesis of the differences between them see Hamam and Georganas [35] and Shleeg and Ellabib [36] .

Table 6
Summary of rules used for both FIS.

Relational
Economic Social  Local   IF  THEN  IF  THEN  IF  THEN  IF  THEN   H Note: VL is very low; L is low; M is medium; H is high; VH is very high.
The logical operations are formed such that the function min and function max are among the most applied. Although other functions such as product and probabilistic OR are also applicable in the expression of these fuzzy operators, function min and function max are always simple, effective and widely used [28] .
Taking as a rule, of the type: In Mamdani's model, the outputs 3 are built by the superposition of the consequent individual rules, of the type [29] : Being, A i e B i fuzzy subsets of universes U e V , each rule can be interpreted from as: is product operation. Being their membership function given by: In summary, according to each rule (8) control of a system (6), the method of Mamdani used all individual rules to compose them into fuzzy R relationship, to the whole system. Being the aggregation operator represented by " ", we have [29] : With membership function μ R ( x, y ) : Based on the compositional inference rule suggested by Zadeh [30] , we have the output set B ( y ): Being, "•" a compositional operator, whose membership function is given by: μ B (y ) (13) Where, ∧ is a t-norm operator.sss After the inference module, defuzzification occurs, which consists in determining the crisp value, that is, obtaining the best representation for the fuzzy output set, applying a defuzzification method to the set B = k (i =1) B i resulting from the aggregation of all fuzzy output sets B i , i = 1 , 2 , . . . , k . This way, defuzzification consists in converting the outputs of fuzzy rules into a crisp value, through different schemes, being the main ones: center of area (CoA), center of gravity (CoG) and the mean of maxima (MoM) [22] .
In this illustrative case, the CoA method was used, also known as centroid. This method determines the center of the fuzzy set area and returns the corresponding crisp value. The center of the area is calculated by: (14) Finally, the fuzzy indexes of the institutional environment for each context are the outputs of the FISs for each TPU. Bearing in mind that their values are defined in a range from 0 to 100, where 100 is considered the best possible institutional environment; conversely, given the context of analysis, and analogously 0 is regarded as the worst.

Results
Tables 7 and 8 , as well as Figs. 6 and 7 , present the results of the research and validate the use of the method in the task of estimating institutional environment indexes.
Some brief analysis can be made from the FIS outputs. In the relational context, there is a better institutional condition of the companies of the Ilha Solteira group (73.8) compared to the other group (59.0). The condition of a High ( Fig. 6 ) relational institutional environment for the Ilha Solteira TPU's was due to better performance of the indicators of frequency of change of trading partners (FMudPar.) and compliance with trade agreements (CumpAcord.).
The FEI and FSI indexes were not statistically different between the groups, with levels between Medium and High for both. On the other hand, in the local context, the FLI of the other TPU's in the state of São Paulo (37.2) indicated a better institutional environment (between Medium and Low) compared to that of Ilha Solteira (19.2) with an environment evaluated between Low and Very Low, as shown in Fig. 7 . It is important to note that this context was the most critical among the four    Note: TPUs ID is tilapia production unit's identification; FRI is fuzzy relational index; FEI is fuzzy economic index; FSI is fuzzy social index; FLI is fuzzy local index.  Note: TPUs ID is tilapia production unit's identification; FRI is fuzzy relational index; FEI is fuzzy economic index; FSI is fuzzy social index; FLI is fuzzy local index. estimated for evaluating the institutional environment of fish farms, mainly because of the level of environmental (LegAmb) and operational (LegOP) legislation indicators. In General, environmental and water cession legislation were the key issues for this critical environment. Despite the difference between the two groups, in broad terms both understood these legislations as barriers, which would lead to a significant impact on the activity. The Compliance with environmental regulations and water cession legislation are recognized bottlenecks in the chain, as pointed out in studies from other Brazilian regions such as Ribeiro [31] , Pedroza Filho et al. [32] , Valenti et al. [33] , Ribeiro and Pedroza Filho [34] .

Conclusions
The article showed how a fuzzy inference system works and how to estimate institutional indexes based on fuzzy logic. The illustrative case demonstrated how indicators created to evaluate an institutional environment can be processed in an expert model. The fuzzy thinking can be useful to better elucidate how institutional aspects of the most different theoretical schools influence the economic performance in micro-level studies, and it is important to note that the method presented can be used with those already prevalent in the research field. For example, it can be used as a step before the use of econometric models, in order to re(model) its inputs. Nevertheless, it can also stimulate new areas of research for several disciplines that take into account institutional thinking being valuable for researchers and policy makers.
As the fuzzy logic provides a significant contribution to research using unclear data, often expressed in linguistic terms, and quite close to human perception, its possibilities for use are extensive. For example, fuzzy modeling can be useful for social sciences and applied social sciences to analyze issues such as poverty, social capital and upgrading (economic, social or environmental). As well, as studies involving more specific analysis such as governance, performance, risk (credit, production or management) and decision-making processes.

Conflicts of Interest
The author declares that he has no known competing financial interests or personal relationships that might have appeared to influence the work reported in this article.