Cross Validated Asked by Ruffybeo on December 27, 2021
Currently, I’m working on an R project for the university. Based on this table: https://drive.google.com/file/d/13aJr5MHLxJ5Zgv0ZdoQzPU7PutLGTDS4/view?usp=sharing
A company would like to introduce an electronic negotiation support system. At the moment, the market has four different systems that work differently (FixDS, FixNoDS, FlexDS, FlexNoDS). You should now decide which of the systems is the most suitable.
For this purpose, you have created a simulation of negotiations with a large number of test persons. The subjects were given a fictitious negotiation case and were divided into 4 groups. One group per system. After this, always two participants within the group had to compete against each other and negotiate. All negotiation systems collect during the negotiation Data.
The interest columns are "Systems" and "NegotiationStatus".
I should perform one analysis:
Use the ?2 test, to find out if there are significant differences between the systems concerning their successful negotiation status. (Successful Negotiation = When the negotiation status is on "Accepted")
I did that with the two columns, transformed them to factors with as.factor and I received the following result:
chisq.test(table(df_negotiation$System, df_negotiation$Verhandlungsstatus))
Pearson's Chi-squared test
data: table(df_negotiation$System, df_negotiation$NegotiationStatus)
X-squared = 11.08, df = 6, p-value = 0.08594
Warning:
Chi-square approximation may be incorrect
I already tried simulate.p.value = TRUE
, but then I receive always a NA
for the df. When I try the same with the efficiency and the systems, I do not have a problem like this. So I’m not really sure if I’m forgetting something for my Chi-Square Test to work? Or is it the case that I want to analyze two text-based inputs?
I would be grateful for every input 🙂
(The other columns are not part of the task)
EDIT: Sharing Code and my Contingency Table:
df_negotiation <- read_excel("Negotiation_data.xlsx")
# filling empty rows with 0
df_negotiation[is.na(df_negotiation)] <- 0
# 2. Transform the data for Chi-Sqaure
#2.1 Transforming needed columns from character (default) into factors
df_negotiation$System = as.factor(df_negotiation$System)
df_negotiation$Negotiation Status = as.factor(df_negotiation$Negotiation Status)
#2.2 Create new variable with cross table of the two variables
#Initiate contingency table
sys.vs.vhs <- table(df_negotiation$System, df_negotiation$Negotiation Status)
#
addmargins(sys.vs.vhs)
# 4. Perform Chi-Squaure-Test
chisq.test(sys.vs.vhs)
Contingency Table:
Accepted Open Rejected Sum
FIXDS 28 0 8 36
FIXNoDS 25 0 7 32
FlEXDS 32 4 2 38
FlEXNoDS 27 3 6 36
Sum 112 7 23 142
Get help from others!
Recent Answers
Recent Questions
© 2024 TransWikia.com. All rights reserved. Sites we Love: PCI Database, UKBizDB, Menu Kuliner, Sharing RPP