Introduction to Correspondence Analysis Using R and Indonesia Real Dataset | by Audhi Aprilliant | Towards Data Science

1 Background  • Objectives  • Benefits  • Scopes2 Methodology  • Data  • The procedure of data analysis3 Result and Discussion  • Data pre-processing and integration  • Data exploration  • Profile table  • Chi-square statistics  • Correspondence analysis4 Interpretation5 References
According to Pahlevi (2017), the creative industry is defined as a system of human activities, both groups and individuals related to the creation, production, distribution, exchange and consumption of goods and services of cultural, artistic, aesthetic, intellectual, and emotional value. Further, the creative industry is an industry that produces tangible and intangible output that has economic value through the exploration of cultural values ​​and the production of science-based goods and services, both traditional and modern products.
Now, the creative industry has been classified into 16 subsectors (game application and development, architectural and interior design, visual communication design, product design, fashion, film, animation video, photography, craft, culinary, music, publishing, advertising, performing arts, fine arts, television and radio) where they have their respective challenges. The 16 subsectors have a distinctive character and it has an impact on their development. One key factor for developing a creative economy is how a city is treated as a cultural and artistic center.
Each province in Indonesia has the potency for the development of creative industries which vary from each other. This can be seen from the creative industries in certain subsectors that dominate a whole of the province. So it is necessary to do an in-depth analysis of the distribution characteristics of the creative industries subsector for the provinces in Indonesia. The analysis that can be used is the correspondence analysis. It is visually similar to the biplot analysis but is used for categorical data in the form of contingency tables. This analysis can provide an ease of understanding through the presentation of graphics that are more interesting, more informative, more communicative, and artistic.
The objectives of the study are:
to identify the relationships between variables in the creative industry subsector in Indonesia, such as application and game developer, architecture and interior design, visual communication design, fashion, etc;
to identify the relative position between provinces in order to see similarities between them in Indonesia based on the creative industry subsector;
to identify the relationships between the creative industry subsector; and
to find out a province that has a low number of creative industry subsectors in Indonesia in 2016.
The benefits of the study are.
to get a snapshot of the development of the creative industry in Indonesia in 2016,
acquire the development trend of the creative industries subsector in Indonesia in 2016, and
become the government’s evaluation materials in developing creative industries in each province in Indonesia.
The scope of the study is that the data used is secondary data on the distribution of the creative industry subsector in Indonesia in 2016 downloaded from the official website of the Indonesian Creative Economy Agency.
The data used is secondary data on the distribution of the creative industry subsector in Indonesia in 2016 downloaded from the official website of the Indonesian Creative Economy Agency. The data has several variables as follow:
The steps carried out in research of correspondence analysis for the Indonesia creative industry subsector in 2016 are as follows:
conduct descriptive analysis to look up the number of creative industry subsectors in each province or region in Indonesia using a contingency tableanalyze the relationship between variables to look up the dependency between provincial variables and the creative industry subsector variablesconduct correspondence analysis between provincial variables and creative industry subsector variables with the following steps as follow:
conduct descriptive analysis to look up the number of creative industry subsectors in each province or region in Indonesia using a contingency table
analyze the relationship between variables to look up the dependency between provincial variables and the creative industry subsector variables
conduct correspondence analysis between provincial variables and creative industry subsector variables with the following steps as follow:
create a row-based profile table and column-based profile table based on the previous contingency table
calculate the value of the proportion of row and column inertia based on the row-based profile and column-based profile in the previous step
calculate the singular value decomposition based on the previous result to display the coordinates of each provincial variable and creative industry subsector variable into a two-dimensional plot
The initial step in the research of correspondence analysis on Indonesian Creative Economy Agency data 2016 was data pre-processing. It is carried out as follows:
manipulate the names of provinces or regions in the Creative Economy Agency data 2016 by eliminating the words “Province” and “Island”. In addition, the name of the province or region was also summarized
select the variables to be analyzed using correspondence analysis. The selected variables are: application and game developer; film, animation and video; visual communication design; photography; and television and radio
# Import librarieslibrary(factoextra)library(FactoMineR)library(gplots)# Read the datadata.ca = read.csv2(file = '/Data Badan Ekonomi Kreatif.csv',                    header = TRUE,                    sep = ';')# Select 5 predictor variablesdata.ca = data.ca[,c(1,2,5,8,9,17)]# Edit First Column as Rownames of Datadata.ca.rownames = data.ca[,1]data.ca = data.ca[,-1]row.names(data.ca) = data.ca.rownames
Data exploration is used to obtain initial information on the creative economy agency data 2016. The exploration is conducted for the variables of application and game developer; visual communication design; film, animation and video; photography; and television and radio.
# Convert the data into contingency tabledt = as.table(as.matrix(data.ca))# Create a balloonplotballoonplot(t(dt),             main = 'Sub-Sector of Creative Industries',             xlab = '',            ylab = '',            label = FALSE,             show.margins = FALSE)
Based on Figure 1, it can be concluded that photography is the subsector that is the biggest creative business or company compared to applications and game developers; visual communication design; film, animation and video; and television and radio. Visually, it also can be concluded that Sumatra is the province or region that has the biggest photography businesses or companies compared to other provinces or regions. However, according to the province, West Java, Central Java, and East Java are the provinces that have the biggest photography businesses or companies compared to other provinces in Indonesia. Other creative businesses besides photography that have many businesses in each province or region are applications and game developers. West Java and East Java are the provinces that have the biggest application and game developer businesses or companies compared to other provinces in Indonesia.
Correspondence analysis begins with a study of the row and column profiles. It aims to find out which creative industry subsectors are developing among provinces or regions in Indonesia in 2016 and to find out which provinces or regions have the biggest creative businesses or companies. The row profile and column profile are shown in table 3 and table 4.
# Create row profiledata.ca.row = data.ca/rowSums(data.ca)View(data.ca.row)mass.row = colMeans(data.ca.row)
The row profile on table 3 shows that the largest mass value is 0.6413 which is in the photography subsector (X4). It is the mode for the data. It shows that the photography subsector is a creative business or company with the highest percentage compared to the others. The existence of photography subsector is found in all provinces or regions, so it can be said that photography tends to be developing in Indonesia in 2016, especially in Yogyakarta, DKI Jakarta, West Java, Central Java, East Java, Bali & NTT, Kalimantan, Sulawesi & Papua, and Sumatra. Meanwhile, in Banten, application and game developer (X1) is the subsector with the highest percentage. So that, in Banten, the application and game developer subsectors are creative businesses that tend to be developing rapidly.
# Create column profiledata.ca.col = t(data.ca)/colSums(data.ca)View(data.ca.col)mass.col = rowMeans(t(data.ca.col))
The column profile in table 4 shows the mass value that 17.76% of the creative industry subsector is in East Java, 16.76% is in West Java, and 16.22% is in Sumatra. The subsector that tends to be developing in Yogyakarta in 2016 is visual communication design. For West Java in 2016, the subsectors that tend to be developing are applications and game developers. For East Java in 2016, the subsectors that tend to be developing are television and radio. As for Sumatra, the subsectors that tend to be developing are film, animation, and film and photography.
To interpret correspondence analysis, the first step is to evaluate whether there is a significant dependency between the rows and columns.
Hypothesis
H0: assumes that there is no association between the two variables
H1: assumes that there is association between the two variables
# To evaluate whether there is a significant dependence between row and column categorieschisq = chisq.test(data.ca)chisq
Because the P-value = 2.2e — 16 is less than the 5% (α), the decision is to reject the null hypothesis. So based on the Chi-Square test, it can be concluded that there is no association between the row and column with the significance level of 5%.
Correspondence analysis is a multivariate analysis using the concept of Principal Component Analysis. To look up the variance, it is necessary to calculate eigenvalue. The eigenvalue of the correspondence analysis is shown in table 5.
# Correspondence analysisres.ca = CA(data.ca, graph = TRUE)print(res.ca)# Eigenvalueeig.val = get_eigenvalue(res.ca)eig.val
Based on table 5, it is found that component 1 and component 2 explain 87.46415% of the variability of the data. So that the results obtained by correspondence analysis are quite good at explaining the data.
# Create Scree plotfviz_screeplot(res.ca, addlabels = TRUE, ylim = c(0, 50))# Create symmetric plot of correspondence analysisfviz_ca_biplot(res.ca, repel = TRUE) # Make correspondence plot
Based on the scree plot in Figure 2 (a), it is found that in component 2, the percentage of variability that can be explained drops steeply. It indicates that the addition of component 3 does not influence the data diversity that can be explained. So that component 1 and component 2 are chosen. The total percentage of variability that can be explained through the two selected components is about 87.46415%.
Some of the information obtained from the correspondence plot is a group of provinces based on the creative industry subsector in Indonesia in 2016. The information is as follows:
The first group is provinces or regions characterized by the creative industry subsectors of photography and television & radio. Provinces or regions included in this group are Central Java, East Java, Bali & NTT, and Sulawesi & Papua
The second group is provinces or regions characterized by the creative film, animation and video industry subsectors as well as application and game developers. Provinces or regions included in this group are Banten, DKI Jakarta, and West Java
The third group is provinces or regions characterized by the visual communication design creative industry subsector. The province or region included in the group is Yogyakarta. This is also indicated by the column profile which shows the highest mass value of the visual communication design subsector from Yogyakarta province compared to other provinces
Please head over to my GitHub repo for looking the completed codes
[1] Anonim. Articles — Principal Component Methods in R: Practical Guide (2017), http://www.sthda.com/.
[2] AS. Pahlevi. Gagasan Tentang Pengembangan Ekonomi Kreatif Nasional (Studi pada Potensi, Peluang dan Tantangan Ekonomi Kreatif di Kota Malang) (2017), Seminar Nasional Seni Dan Desain: “Membangun Tradisi Inovasi Melalui Riset Berbasis Praktik Seni Dan Desain” FBS Unesa.