Question
write codes on Rstudio using the table and the below; Table 3 presents the correlation results for key customer service attributes. Table 3: Correlation Matrix
write codes on Rstudio using the table and the below;
Table 3 presents the correlation results for key customer service attributes.
Table 3: Correlation Matrix of Customer Feedback Keywords
Quality | Service | Price | Selection | Cleanliness | Atmosphere | Convenience | Location | Staff | Wait Time |
Quality | 1.00 | 0.45 | -0.23 | 0.57 | 0.38 | 0.32 | 0.24 | 0.15 | 0.18 | -0.05 |
Service | 0.45 | 1.00 | 0.12 | 0.65 | 0.51 | 0.46 | 0.39 | 0.28 | 0.62 | 0.21 |
Price | -0.23 | 0.12 | 1.00 | -0.35 | -0.26 | -0.15 | -0.20 | -0.31 | -0.08 | 0.13 |
Selection | 0.57 | 0.65 | -0.35 | 1.00 | 0.43 | 0.38 | 0.31 | 0.12 | 0.23 | -0.10 |
Cleanliness | 0.38 | 0.51 | -0.26 | 0.43 | 1.00 | 0.49 | 0.36 | 0.21 | 0.29 | -0.05 |
Atmosphere | 0.32 | 0.46 | -0.15 | 0.38 | 0.49 | 1.00 | 0.27 | 0.18 | 0.25 | -0.08 |
Convenience | 0.24 | 0.39 | -0.20 | 0.31 | 0.36 | 0.27 | 1.00 | 0.34 | 0.21 | -0.15 |
Location | 0.15 | 0.28 | -0.09 | 0.22 | 0.15 | 0.18 | 0.30 | 1.00 | 0.18 | -0.13 |
Staff | 0.18 | 0.62 | -0.08 | 0.23 | 0.29 | 0.25 | 0.21 | 0.18 | 1.00 | 0.12 |
Wait Time | -0.05 | 0.21 | 0.13 | -0.10 | -0.05 | -0.08 | -0.15 | -0.13 | 0.12 | 1.00 |
Source: Customer Survey Analysis (2023)
Note: The values in the table represent the Pearson correlation coefficient between the corresponding pairs of feedback keywords.
# Perform sentiment analysissentiment <- inner_join(as.data.frame(dtm), customer_data, by = c("row.names" = "feedback"))sentiment <- sentiment[, c("row.names", "SentimentScore")]
# Perform topic modelinglda <- LDA(dtm, k = 5) # Adjust the number of topics (k) as needed
# Extract topics from the modeltopics <- tidy(lda, matrix = "beta")topics <- topics %>% group_by(topic) %>% top_n(10, beta) %>% ungroup()
# Perform entity extractionentities <- corpus %>% unnest_tokens("entity", input = text) %>% anti_join(stop_words)
# Save the resultswrite.csv(sentiment, "sentiment_analysis_results.csv", row.names = FALSE)write.csv(topics, "topic_modeling_results.csv", row.names = FALSE)write.csv(entities, "entity_extraction_results.csv", row.names = FALSE)
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started