Skip to contents

The calculate_degrees function is used to analyse cognitive map (CM) data. It calculates various standard CM measures. You need to run this function first before you can run the more complicated functions in this package: (instrument_support, paradigm_support evaluate_concepts).

Usage

calculate_degrees(edgelist, nodelist)

Arguments

edgelist

The function takes an edgelist (dataframe) including all relations in a CM. The data needs to following column structure. The last two columns include the meta-data and are optional. For other research projects, other types of meta-data may be important.

 * from: the 'cause'-node/concept id (corresponding to the id in the nodelist)

 * to: the 'effect'-node/concept id (corresponding to the id in the nodelist)

 * weight: the weight of the edge/relation (the number of times the relation
    is mentioned in the raw data (speech/text/survey))

 * map_id: a unique id for the source (speech/text/respondent) the CM
    is derived from

 * map_date: the date of the source (speech/text/survey)the CM is derived
    from

nodelist

The function takes a nodelist (dataframe) including all unique nodes/concepts in the CM. The data needs to follow the column structure listed below. Other columns may be included containing categorization of the concepts in terms of - for instance - the paradigm they align with or the type of policy instrument the concept refers to. For different research projects, different types of categorizations may be relevant. In addition, researchers may want to add meta-data to the nodes. The required column structure:

 * id: unique id (number) for the node/concept

 * node_name: node name/concept in words

 * paradigms: a set of rivaling paradigms concepts may align with

 * instruments: the type of policy instrument the concept refers to

Value

The function returns a dataframe entitled "node_measures" with all calculated values as well as the original data. For the function to return and store the following output a dataframe with the values, you need to insert the following code below the function in your script:

  * node_measures_name_period <- calculate_degrees(edgelist, nodelist)

Details

For each concept (node) in a map, the function calculates:

* degree (also called centrality): the number of unique relations/edges
  by which the concept/node is connected to others (unweighted)

* indegree: the number of relations/edges feeding into a concept/node

* outdegree: the number of relations/edges feeding out of a concept/node

* the goal-orientation (go): (indegree-outdegree)/degree

Their weighted equivalents

* weighted degree (also called saliency): the number of relations/edges
    by which the concept/node is connected to others taking into account
    the weight of the relations.

* indegree: the number of relations/edges feeding into a concept/node taking
    into account their weight (sum of weights of all ingoing relations)

* outdegree: the number of relations/edges feeding out of a concept/node
    taking into account their weight(sum of weights of all outgoing relations)

* the weighted goal-orientation (gow): (W indegree - W outdegree)/W degree