pcir

pcir: Potential for Conflict Index in R pcir website

Overview

pcir is an R package designed to help researchers and practitioners calculate, compare, and visualize the Potential for Conflict Index (PCI). The PCI is a descriptive statistical method used to enhance understanding of outcomes in human dimensions research (Manfredo et al. 2003; Vaske et al. 2010). The package will equip users with the tools required for calculating, comparing, and graphing the potential for conflict. The concepts of consensus and disagreement or conflict hold relevance across various fields, including economics, political science, psychology, sociology, and natural resources. It is worth noting that although PCI can currently be computed using software such as Excel, SPSS, and SAS, there is no dedicated R package available for conducting this specific analysis.

The development of this package is part of my training in the rOpenSci Champions Program, supported by the Chan Zuckerberg Initiative.

Additional information:

Theoretical approach

Figure 1. Likert scales of the Potential for Conflict Index (PCI).

Workflow

Stages of the ‘pcir’ package:

  1. Read the data input from the interviews/ See exemple dataset (Spreadsheet);

  2. Count the frequencies of responses within each question / Write (Table 1);

  3. Calculate the potential conflict index for each question / Write (Table 2);

  4. Create a bubble chart using the indices / Save (Figure).

Figure 2. Workflow of the ‘pcir’ package.

Features

Installation

You can install the development version of pcir directly from GitHub:

# Uncomment the line below if devtools is not installed
# install.packages("devtools")
devtools::install_github("fblpalmeira/pcir")

Usage

Load the package if pcir is already installed.

# Load the Package:
library(pcir)
# Example dataset:
df1 <- data.frame(
  A = c(-1, 2, 2, 3, -1),
  B = c(-1, 2, 3, -1, 2),
  C = c(1, 2, -2, 3, -1),
  D = c(3, 2, 1, -1, -2),
  E = c(2, 3, 1, -1, -3)
  )

Counting function:

# The counting function summarizes data by counts, percentages, means, and standard deviations
df_count <- counting(df1)
df_count

PCI function:

# The pci function calculates the Potential for Conflict Index (PCI)
df_pci <- pci(df_count)
df_pci

Bubble plot function:

# The bubble function creates a bubble plot to visualize the PCI results
bubble_plot <- bubble(df_pci)
bubble_plot # Display the bubble plot

Figure 3. Bubble graph illustranting the Potencial Conflict Indices.

References

Manfredo, M., Vaske, J., Teel, T. (2003). The potential for conflict index: A graphic approach to practical significance of human dimensions research. Human Dimensions of Wildlife, 8(3), 219-228.

Vaske, J. J., Beaman, J., Barreto, H., Shelby, L. B. (2010). An extension and further validation of the potential for conflict index. Leisure Sciences, 32(3), 240-254.

Citation

# If you use the `pcir` package in your work, please cite it as follows:
citation(package = 'pcir')
To cite the 'pcir' package in publications, use:

  Palmeira F (2024). _pcir: Potential for Conflict Index in
  R_. R package version 0.1.0,
  <https://github.com/fblpalmeira/pcir>.

The BibTeX entry for LaTeX users is

  @Manual{,
    title = {pcir: Potential for Conflict Index in R},
    author = {Francesca Palmeira},
    year = {2024},
    note = {R package version 0.1.0},
    url = {https://github.com/fblpalmeira/pcir},
  }

License

This package is licensed under the MIT License. See the LICENSE file for more details.

Contact

For any questions or inquiries, please contact Francesca Palmeira at francesca@alumni.usp.br.