# Theory evaluation

## Description

Function to enable theory evaluation, as introduced by Ragin (1987, p.118) and extended Schneider & Wageman (2012, p.295), by producing parameters of fit for all possible intersections between a given theoretical statement (a SOP expresison) and the solutions found by function `minimize()`.

## Usage

    modelFit(model, theory)

## Arguments

`model` |  |  |  | A minimization object of class `"qca"`.
`theory` |  |  |  | Character, a SOP expression.

## Details

There are in fact four intersections: presence - presence, presence - absence, absence - presence and absence - absence, where by "absence" is actually meant a negation of an expression using the function `negate()`.

When multiple models exist, all of them are automatically detected, negated and intersection with the theory. Intersections and parameters of fit are going to be produced using a single theoretical expression.

## Value

A list containing objects of class `"pof"` with the parameters of fit. For a single theoretical expression and a single model, the object is a simple `"pof"` object.

## References

Ragin, C.C. (1987) The Comparative Method: Moving beyond Qualitative and Quantitative Strategies. Berkeley: University of California Press.

Schneider, C.Q.; Wagemann, C. (2012) Set-Theoretic Methods for the Social Sciences: A Guide to Qualitative Comparative Analysis (QCA). Berkeley: University of California Press.

## Examples

    # Lipset fuzzy version data
    data(LF)
    ttLF <- truthTable(LF, outcome = "SURV", incl.cut = 0.8)

    # parsimonious solution
    pLF <- minimize(ttLF, include = "?")

    modelFit(model = pLF, theory = "DEV*STB")

    MODEL:        DEV*ind + URB*STB
    THEORY:       DEV*STB
    MODEL*THEORY: DEV*ind*STB + DEV*URB*STB
    MODEL*theory: dev*URB*STB + DEV*ind*stb
    model*THEORY: DEV*urb*IND*STB
    model*theory: dev*urb + dev*stb + IND*stb

                     inclS  PRI    covS
    ------------------------------------
    1  DEV*ind       0.815  0.721  0.284
    2  URB*STB       0.874  0.845  0.520
    3  MODEL         0.850  0.819  0.714
    4  THEORY        0.869  0.848  0.824
    5  MODEL*THEORY  0.866  0.839  0.660
    6  MODEL*theory  0.688  0.422  0.191
    7  model*THEORY  0.709  0.634  0.237
    8  model*theory  0.234  0.057  0.255
    ------------------------------------

    # hypothetical exploration of intermediate solutions
    iLF <- minimize(ttLF, include = "?", dir.exp = "1,0,0,0,0")

    modelFit(iLF, "DEV*STB")

    M1-C1P1
    MODEL:        DEV*urb*ind + DEV*URB*STB
    THEORY:       DEV*STB
    MODEL*THEORY: DEV*URB*STB + DEV*urb*ind*STB
    MODEL*theory: DEV*urb*ind*stb
    model*THEORY: DEV*urb*IND*STB
    model*theory: dev + URB*stb + IND*stb

                     inclS  PRI    covS
    ------------------------------------
    1  DEV*urb*ind   0.806  0.719  0.268
    2  DEV*URB*STB   0.901  0.879  0.468
    3  MODEL         0.866  0.839  0.662
    4  THEORY        0.869  0.848  0.824
    5  MODEL*THEORY  0.866  0.839  0.660
    6  MODEL*theory  0.671  0.311  0.122
    7  model*THEORY  0.709  0.634  0.237
    8  model*theory  0.254  0.091  0.295
    ------------------------------------

    M2-C1P1
    MODEL:        DEV*URB*STB + DEV*ind*STB
    THEORY:       DEV*STB
    MODEL*THEORY: DEV*URB*STB + DEV*ind*STB
    MODEL*theory: -
    model*THEORY: DEV*urb*IND*STB
    model*theory: dev + stb

                     inclS  PRI    covS
    ------------------------------------
    1  DEV*URB*STB   0.901  0.879  0.468
    2  DEV*ind*STB   0.814  0.721  0.282
    3  MODEL         0.866  0.839  0.660
    4  THEORY        0.869  0.848  0.824
    5  MODEL*THEORY  0.866  0.839  0.660
    6  MODEL*theory    -      -      -
    7  model*THEORY  0.709  0.634  0.237
    8  model*theory  0.253  0.091  0.295
    ------------------------------------

## Author

Adrian Dusa

## See also

`intersection`, `negate` `pof`