Xsample | R Documentation |
Given an inverse input list, randomly samples the unknowns, using an MCMC method
Xsample(lim, exact = NULL, ...)
lim |
a list that contains the linear inverse model
specification, as generated by function |
exact |
if not |
... |
extra parameters passed to function
|
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.
a 2-columned vector containing the minimum (column 1) and maximum (column 2) of each unknown.
Karline Soetaert <karline.soetaert@nioz.nl>
Van den Meersche K, Soetaert K, Van Oevelen D (2009). xsample(): An R Function for Sampling Linear Inverse Problems. Journal of Statistical Software, Code Snippets, 30(1), 1-15.
http://www.jstatsoft.org/v30/c01/
Varranges
which estimates the ranges of inverse variables
Plotranges
to plot the ranges
function xsample
from packagelimSolve
# sample solution space xs <- Xsample(LIMRigaAutumn, iter = 500, jmp = 5) # remove flows that are invariable (sd=0) xs <- xs[ ,-which(apply(xs, 2, sd) == 0 )] #pairs plot pairs(xs, gap = 0, pch = ".", upper.panel = NULL)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.