boolprep {boolean}R Documentation

Generate Functional Form for Boolean Logit or Probit

Description

Takes as arguments the logical form of a Boolean model, the dependent variable, and the vectors of independent variables, and produces a functional form suitable for inclusion in a boolean logit or probit command.

Usage

boolprep(form, depvar, a, b = "", c = "", d = "", e = "", f = "",
g = "", h = "", i = "", j = "", k = "", l = "", m = "", n = "",
o = "", p = "", q = "", r = "", s = "", t = "", u = "", v = "",
w = "", x = "", y = "", z = "", constant = TRUE)

Arguments

form Form of Boolean model, e.g., a&b, a&(b|c), etc.
depvar Dependent variable.
a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p,q,r,s,t,u,v,w,x,y,z Vectors of independent variables corresponding to a, b, etc., in form.
constant Indicates whether constants should be placed in each vector of independent variables (note that the syntax requires that constant terms be explicitly included).

Details

Because the structure of a Boolean logit or probit model can be arbitrarily complex, the layering of parentheses soon becomes tedious and unnecessarily difficult. To make life easier, the boolprep command automates the task of creating the appropriate argument.

Value

A text string of the form y ~ f(x1...xn).

Author(s)

Bear F. Braumoeller, Harvard University, bfbraum@fas.harvard.edu
Jacob Kline, Harvard University, jkline@fas.harvard.edu

References

Braumoeller, Bear F. (2003) "Causal Complexity and the Study of Politics." Political Analysis 11(3): 209-233.

See Also

boolean, boolprof, and boolfirst.

Examples

boolprep("a&b", "y", "x1+x2", "x3+x4+x5")

boolprep("a|(b&c)", "y", "x1+x2+x3", "x4+x5", "x6")

boolprep("(a|b|c)&(d|e)&f", "y", "x1+x2", "x3+x4+x5", "x6", "x7+x8", "x9+x10+x11", "x12+x13")

[Package boolean version 1.07 Index]