Error: Incorrect outcome specification.

132 views
Skip to first unread message

Luc Dana

unread,
Aug 10, 2022, 6:53:38 AM8/10/22
to QCA with R
Hi!

I have a question regarding the truthTable command in R.
I get the message Error: Incorrect outcome specification. I do not know what that means as all conditions are calibrated. The problem continues even when I create a new dataframe with the calibrated variables (+ outcome) only.

I have previously stumbled upon this error message but was able to solve it by either creating a new dataframe or by creating a new csv file with the relevant variables only.

I'm thankful for any advice on this issue.

Best,
Luc

Ingo Rohlfing

unread,
Aug 10, 2022, 7:08:56 AM8/10/22
to qcaw...@googlegroups.com

Dear Luc,

could you please paste the command that you use in this email and say a little bit more about the data and sets? Are the sets crisp, fuzzy, multivalue or a combination of this?

Regards

Ingo

Luc --
You received this message because you are subscribed to the Google Groups "QCA with R" group.
To unsubscribe from this group and stop receiving emails from it, send an email to qcawithr+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/qcawithr/154ecd7e-a978-4cee-a51b-c6d748a72775n%40googlegroups.com.
-- 
Ingo Rohlfing
Cologne Center for Comparative Politics
Universität zu Köln
office: Herbert-Lewin-Str. 2 (IBW-Gebäude), room 313.c
phone: +4922147089973
fax: +492214702889
Albertus-Magnus-Platz
50923 Köln
http://ingorohlfing.wordpress.com

Luc Dana

unread,
Aug 10, 2022, 7:18:01 AM8/10/22
to QCA with R
Dear Ingo,

the code for this is: 

truthTable(panel_QCA, outcome = "GRITC", conditions = "IQ, FRIENDS, MATEDU, SATISF, FRANCS", complete = TRUE, show.cases = TRUE, sort.by = "out")

It is a fuzzy-set QCA.

Best,
Luc

Adrian Dușa

unread,
Aug 10, 2022, 7:47:00 AM8/10/22
to QCA with R
Hi Luc,

We need a reproducible example to figure what is going on.
Most likely, your outcome name is not found in the data. Could you please check if GRITC is (exactly) the name of your outcome column in the dataset?

Could you perhaps post the result of the command:
colnames(panel_QCA)

Best,
Adrian

Luc Dana

unread,
Aug 10, 2022, 11:49:35 AM8/10/22
to QCA with R
Hi Adrian,

not sure why but it does work now. 

I created a new dataframe with the calibrated variables only: test <- panel_QCA[, c ("GRITC", "IQ", "FRIENDS", "MATEDU", "SATISF", "FRANCS")]

Then this code works: truthTable(test, outcome = "GRITC", conditions = "IQ, FRIENDS, MATEDU, SATISF, FRANCS", incl.cut = 0.9, pri.cut = 0.7, complete = TRUE, show.cases = TRUE, sort.by = "out")

However, the previous dataframe still doesn't work:  truthTable(panel_QCA, outcome = "GRITC", conditions = "IQ, FRIENDS, MATEDU, SATISF, FRANCS", incl.cut = 0.9, pri.cut = 0.7, complete = TRUE, show.cases = TRUE, sort.by = "out")

Screenshot 2022-08-10 153749.png

Anyways, many thanks for your help!

Best,
Luc

Ingo Rohlfing

unread,
Aug 10, 2022, 12:02:17 PM8/10/22
to qcaw...@googlegroups.com

I am not sure, but what is the first column titled "X" in panel_QCA? If this has not been created by you, I assume it is empty and has been created by R when importing the data (I think it is empty, but if not there is something else weird about it). When I remember correctly this causes problems with some functions. If you want to get to the bottom of it, you could only remove X from panel_QCA and check whether truthTable() works then. In general, I recommend to remove X right after importing the data or use another package/function for data import.

Adrian Dușa

unread,
Aug 10, 2022, 2:38:32 PM8/10/22
to QCA with R
Indeed.
Additionally, if you could send your data (privately if needed), I could take a look at the original dataset to determine where that error actually originates from.

Habtamu Diriba

unread,
Sep 19, 2023, 3:54:50 PM9/19/23
to QCA with R
Dear Adrian, dear all,

I am using the QCA R package by Adrian which is super helpful. However, I am having a similar issue that a previous user (Luc) had with the  the truthTable command in R.
I get the message Error: Incorrect outcome specification. I have tried multiple outcome alternatives from the dataset to see if it works but with all alternatives it returns the same error message. I am using it on a calibrated fuzzy set QCA. Here is a copy of the error message:  truthTable(HEBCCopy, outcome = "ToReConCPD", conditions = "InDeUnEp,
  InDeUnAs, InDeUnCon, InDeUnIns, CStPlBu, CStPlCo, CStIn, CWDeSt,
  CInUbcExp, CTotInGov, CInAcEnCo, CInAcEnBu, CInAcEnPu, CTiAl, CRegen,
  CSST1, CSST2, CSST3")


Error in truthTable(HEBCCopy, outcome = "ToReConCPD", conditions = "InDeUnEp, InDeUnAs, InDeUnCon, InDeUnIns, CStPlBu, CStPlCo, CStIn, CWDeSt, CInUbcExp, CTotInGov, CInAcEnCo, CInAcEnBu, CInAcEnPu, CTiAl, CRegen, CSST1, CSST2, CSST3") : Incorrect outcome specification. 

Secondly I am also having an issue with saving/exporting the calibrated version from the Graphical User Interface. I am using windows, I click export but could not find the exported file in the directory.

I would really appreciate your help on this

With warm regards
Habtamu

Adrian Dușa

unread,
Sep 21, 2023, 3:42:21 AM9/21/23
to QCA with R
Dear Habtamu,

We need a replicable example (including a test dataset) to figure out what is going on.
At a first sight, your command looks fine, is your outcome "ToReConCPD" a column name in your dataset? (it must be exactly so, with this particular upper-lower case choice).

Otherwise,  the culprit must be within your data. But since this is a rather large truth table (with 18 explanatory conditions), you might want to gradually start from a small one, say using 4-5 conditions, and if everything looks right then step by step introduce new conditions until the error appears.
Chances are you will find something unusual with the latest condition(s) that generated the error.

I hope this helps,
Adrian
Reply all
Reply to author
Forward
0 new messages