boolfirst              package:boolean              R Documentation

_G_r_a_p_h _F_i_r_s_t _D_i_f_f_e_r_e_n_c_e_s _a_f_t_e_r _B_o_o_l_e_a_n _L_o_g_i_t/_P_r_o_b_i_t

_D_e_s_c_r_i_p_t_i_o_n:

     This function graphs first differences for a given variable, with
     all other variables held at their means, following the execution
     of a 'boolean' logit or probit command.

_U_s_a_g_e:

     boolfirst(object, gvar, instance = 0, range = 0)

_A_r_g_u_m_e_n_t_s:

  object: The object created by the boolean command. 

    gvar: Name of variable associated with coefficient of interest. 

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)) 

_A_u_t_h_o_r(_s):

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

_R_e_f_e_r_e_n_c_e_s:

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

_S_e_e _A_l_s_o:

     'boolean', 'boolprep',  and 'boolprof'.

_E_x_a_m_p_l_e_s:

     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")
     boolfirst(answer, "x4")
     boolprof(answer, "x1", instance=2)

