boolprep {boolean} | R Documentation |
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.
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)
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). |
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.
A text string of the form y ~ f(x1...xn)
.
Bear F. Braumoeller, Harvard University, bfbraum@fas.harvard.edu
Jacob Kline, Harvard University, jkline@fas.harvard.edu
Braumoeller, Bear F. (2003) "Causal Complexity and the Study of Politics." Political Analysis 11(3): 209-233.
boolean
, boolprof
,
and boolfirst
.
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")