| boolprof {boolean} | R Documentation |
This command produces a graph of the profile likelihood for a given coefficient following the estimation of a Boolean logit or probit model.
boolprof(object, gvar, instance = 0, range = 0)
object |
The object created by the boolean command. |
gvar |
Name of variable associated with coefficient of interest, or a constant ("cons"). |
instance |
If variable occurs more than once in equation, permits user to specify which occurrence corresponds to the coefficient of interest. |
range |
Range of points over which graph is plotted (e.g., range=seq(0,1,0.01)) |
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, boolprep,
and boolfirst.
library("boolean")
set.seed(50)
x1<-rnorm(1000)
x2<-rnorm(1000)
x3<-rnorm(1000)
x4<-rnorm(1000)
x5<-rnorm(1000)
x6<-rnorm(1000)
e1<-rnorm(1000)/3
e2<-rnorm(1000)/3
e3<-rnorm(1000)/3
y<-1-(1-pnorm(-2+0.33*x1+0.66*x2+1*x3+e1)*1-(pnorm(1+1.5*x4-0.25*x5+e2)*pnorm(1+0.2*x6+e3)))
y <- y>runif(1000)
answer <- boolean(y ~( ((cons+x1+x2+x3)|((cons+x4+x5)&(cons+x6))) ), method="probit")
boolprof(answer, "x1")
boolprof(answer, "cons", instance=2)