feasible              package:polyapost              R Documentation

_F_e_a_s_i_b_l_e _s_o_l_u_t_i_o_n _f_o_r _a _p_r_o_b_a_b_i_l_i_t_y _d_i_s_t_r_i_b_u_t_i_o_n _w_h_i_c_h _m_u_s_t
_s_a_t_i_s_f_y _a _s_y_s_t_e_m _o_f _l_i_n_e_a_r _e_q_u_a_l_i_t_y _a_n_d _i_n_e_q_u_a_l_i_t_y _c_o_n_s_t_r_a_i_n_t_s.

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

     This function finds a feasible solution, p=(p1,...,pn), in the
     n-dimensional   simplex of probability distributions which must
     satisfy A1p = b1, A2p <= b2 and A3p >= b3. All the components of
     the bi's must be nonnegative In addition  each probability in the
     solution must be at least as big as eps, a small positive number.

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

     feasible(A1,A2,A3,b1,b2,b3,eps)

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

      A1: The matrix for the equality constraints.This must always
          contain the constraint that the sum of the pi's is one.

      A2: The matrix for the <= inequality constraints. This must
          always contain the constraints -pi <= 0, i.e. that the pi's
          must be nonnegative.

      A3: The matrix for the >= inequality constraints. If there are no
          such constraints A3 must be set equal to NULL.

      b1: The rhs vector for A1, each component must be nonnegative.

      b2: The rhs vector for A2, each component must be nonnegative.

      b3: The rhs vector for A3, each component must be nonnegative. If
          A3 is NULL then b3 must be NULL.

     eps: A small positive number. Each member of the solution must be
          at least as large as eps. Care must be taken not to choose a
          value of eps which is too large.

_V_a_l_u_e:

     The function returns a vector. If the components of the vector are
     positive then the feasible solution is the vector returned,
     otherwise there is no feasible solution.

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

     A1<-rbind(rep(1,7),1:7)
     b1<-c(1,4)
     A2<-rbind(c(1,1,1,1,0,0,0),c(.2,.4,.6,.8,1,1.2,1.4))
     b2<-c(1,2)
     A3<-rbind(c(1,3,5,7,9,10,11),c(1,1,1,0,0,0,1))
     b3<-c(5,.5)
     eps<-1/100
     feasible(A1,A2,A3,b1,b2,b3,eps)

