Xsample                 package:LIM                 R Documentation

_G_e_n_e_r_a_t_e_s _a _r_a_n_d_o_m _s_a_m_p_l_e _o_f _t_h_e _u_n_k_n_o_w_n_s _f_o_r _a _l_i_n_e_a_r _i_n_v_e_r_s_e _p_r_o_b_l_e_m

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

     Given an inverse input list, randomly samples the unknowns, using
     an MCMC method

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

     Xsample(lim, exact=NULL, ...)

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

    lim : a list that contains the linear inverse model specification,
          as  generated by function 'setup.limfile'. 

  exact : if not 'NULL', a vector containing the numbers of the
          equations to be solved exactly; if 'NULL', all equations are
          considered exact. 

    ... : extra parameters passed to function 'xsample' from
          package'limSolve'. 

_D_e_t_a_i_l_s:

     For overdetermined LIM problems, the inverse equations may be
     split up in equations which have to be exactly met and other
     equations which have to be approximated.

     'exact' is a vector with the exact equations

     The default settings of 'xsample' will often not do. For instance,
     the default consists of 3000 iterations ('iter') and a jump length
     of 'jmp' of 0.1. You may need to increase one of those to ensure
     that the entire solution space has been adequately sampled.

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

     a 2-columned vector containing the minimum (column 1) and maximum
     (column 2) of each unknown.

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

     Karline Soetaert <k.soetaert@nioo.knaw.nl>

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

     'Varranges' which estimates the ranges of inverse variables

     'Plotranges' to plot the ranges

     function 'xsample' from package'limSolve'

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

     # sample solution space
       xs <- Xsample(LIMRigaAutumn,iter=500,jmp=5)
       # remove flows that are invariable (sd=0)
       xs <- xs[,-which(sd(xs)==0)]
       #pairs plot
       pairs(xs,gap=0,pch=".",upper.panel=NULL)

