truthTable re-coding outcome as Zero - Please help

26 views
Skip to first unread message

Simon Kolbeck

unread,
Mar 24, 2020, 12:45:21 PM3/24/20
to QCA with R
Hello,

I have a 59 row by 9 column data.frame. called "hqca2"  These are the top 5 rows:

    TP PD GDP IM DEM ADP GIN EF HOM
GBR  1  1   1  0   1   1   0  1   0
IRL  1  1   1  0   1   1   0  1   1
NLD  1  1   1  0   1   1   1  1   0
BEL  1  1   1  0   1   1   0  1   0
CHE  1  1   1  0   1   0   1  1   0

The outcome "HOM" occurs 16 times. However, when I specify the truthTable using the code below, the outcome gets recoded as Zero.
htt2 <- truthTable(hqca2, outcome="HOM",show.cases=TRUE,sort.by=c("incl","n"), complete=FALSE)
htt2

I get the message below the truth table that: It seems that all outcome values have been coded to zero.

Here is the top of the truth table
      TP PD GDP IM DEM ADP GIN EF   OUT    n  incl  PRI   cases                              
234   1  1   1  0   1   0   0  1     0     8  0.750 0.750 DOM,MEX,HND,NIC,PAN,PRY,MMR,NPL    
238   1  1   1  0   1   1   0  1     0     4  0.500 0.500 GBR,IRL,BEL,PRT                    
235   1  1   1  0   1   0   1  0     0     2  0.500 0.500 ZAF,BGD

There are cases listed, such as "IRL" which are coded as 1 for HOM in my data.frame, but in the truthtable OUT shows up as 0.

What could be causing this? Any suggestions or advice would be greatly appreciated. Thank you

Adrian Dușa

unread,
Mar 24, 2020, 12:53:11 PM3/24/20
to Simon Kolbeck, QCA with R
Dear Simon,

This is a very simple matter of inclusion cut-off.
You need to lower the value for the "incl.cut" argument, which defaults to 1 and none of your configurations has a perfect inclusion.

Please have a look on the examples from the function, using:
?minimize

To get more insight about the inclusion cut-off, I would warmly recommend to read the related chapters from my Springer book, which you can freely access at:
https://bookdown.org/dusadrian/QCAbook/

(you need to create an account and log in)

I hope this helps,
Adrian
> --
> 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/232311eb-aa2c-4f24-91df-9ea3f09fc431%40googlegroups.com.


Adrian Dusa
University of Bucharest
Romanian Social Data Archive
Soseaua Panduri nr. 90-92
050663 Bucharest sector 5
Romania
https://adriandusa.eu

Simon Kolbeck

unread,
Mar 24, 2020, 3:49:13 PM3/24/20
to QCA with R
Adrian,

Thank you very much for the prompt reply. I am still in the process of learning this method, so I appreciate your help with this trivial error.
It works now!

Best,

Simon
> To unsubscribe from this group and stop receiving emails from it, send an email to qcaw...@googlegroups.com.

Jacob Lewis

unread,
May 22, 2020, 8:58:59 AM5/22/20
to QCA with R
Hi Adrian,

Thanks for setting up this Google Group!

Like Simon, I am struggling with the QCA package's re-coding of the outcome variable. I've gone back and re-read Chapter 6 in Ragin's (1987) The Comparative Method, but am struggling to reproduce truth tables with the QCA package because the package keeps re-coding my outcome.

I am still new to QCA, so please forgive any questions that seem obvious; all I can say is that they are not obvious to me.

I did read the sections in your book on sufficiency/inclusion (6.2) and truth tables (7), but I remain quite confused. What I really want to do is to create a simple truth table such as Table 3 in Ragin (1987, p. 88). I'm trying to do so with the data found in fg2.csv (attached to this message). Unfortunately, the truth table function recodes my outcome variable.

Here is the code I am using:
truthTable(data = fg2,
                    outcome
= "sd",
                    conditions
= c("ethnic", "violent_ind", "pubgoods"))

Here is what the R QCA package produces:

  OUT: output value
    n: number of cases in configuration
 incl: sufficiency inclusion score
  PRI: proportional reduction in inconsistency

    ETHNIC VIOLENT_IND PUBGOODS   OUT    n   incl  PRI  
1     0         0         0        0     18  0.111 0.111
2     0         0         1        0     17  0.059 0.059
3     0         1         0        0     18  0.278 0.278
4     0         1         1        0     13  0.000 0.000
5     1         0         0        0     7   0.000 0.000
6     1         0         1        0     22  0.364 0.364
7     1         1         0        0     19  0.579 0.579
8     1         1         1        0     12  0.000 0.000

It seems that all outcome values have been coded to zero.
Suggestion: lower the inclusion score for the presence of the outcome,
the relevant argument is "incl.cut" which now has a value of 1.

It's not clear to me why the truth table command re-codes all outcome values to zero based on inclusion score.

When I calculate the truth-table by hand, I get this:

ethnic violent_ind pubgoods sd OUT
n
0 0 0 0 16
0 0 0 1 2
0 0 1 0 16
0 0 1 1 1
0 1 0 0 13
0 1 0 1 5
0 1 1 0 13
1 0 0 0 7
1 0 1 0 14
1 0 1 1 8
1 1 0 0 8
1 1 0 1 11
1 1 1 0 12


I am clearly missing something fundamental - but I don't know what it is!

Thank you in advance for your help!

Jacob


On Tuesday, March 24, 2020 at 12:53:11 PM UTC-4, Adrian Dușa wrote:
> To unsubscribe from this group and stop receiving emails from it, send an email to qcaw...@googlegroups.com.
fg2.csv

Adrian Dușa

unread,
May 22, 2020, 10:48:10 AM5/22/20
to Jacob Lewis, QCA with R
Hi Jacob,

It is still a matter of inclusion cut-off. Looking at your truth table, I can see the largest inclusion is 0.579, well below the default cut-off equal to 1.
Using this default, only perfectly consistent configurations will be coded (not re-coded) as 1, while your consistencies are very low.

In order to circumvent this issue, Ragin introduced this cut-off and the recommended minimum is somewhere between 0.75 and 0.8, certainly not below 0.75.

But your highest consistency score is 0.579, which means there is absolutely no chance for you to get positive configurations with such inconsistent data. I suspect this might be a problem of calibration: how did you produce the presence / absence scores for your causal conditions and outcome?

Your hand produced truth table does not seem to be correct, as you've calculated 16 configurations (including the outcome) while there are only 3 causal conditions hence there should be no more than 8 configurations in the truth table. The outcome does not count in the configuration list, it is used to calculate the consistencies of those configurations against it.

Your base problem is the highly inconsistent data, looks almost random. With 126 cases and 3 causal conditions, it looks suspiciously taken from some kind of large-N experiment. While QCA <can> be used for large data, at its heart it is still a qualitative method, which means you should aim to be familiar and have have intimate knowledge about each and every one of your cases.

Or, that is by definition impossible in the quantiative world, where cases are merely used to calculate an average, or a standard deviation.

I hope this helps,
Adrian

> 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/7c48870c-e234-42c8-809d-5ccb83244e1f%40googlegroups.com.
> <fg2.csv>

Jacob Lewis

unread,
May 22, 2020, 12:55:49 PM5/22/20
to QCA with R
Adrian,

Thank you so much for your prompt response! As mentioned, I am still trying my hand at QCA. You're right that these data are from a larger dataset of observed cases. You're also right that calibration of the variables is  something I'm working on.

I really appreciate your help!

Jacob
Reply all
Reply to author
Forward
0 new messages