ShowModels {RandomFields} | R Documentation |
ShowModels
is an interactive plot for
the selection of
models and their one- or two-dimensional simulations;
it also allows for the fitting of variogram models by eye.
CURRENTLY NOT AVAIABLE IN VERSION 2 OF RANDOMFIELDS. PLEASE USE VERSION 1.3.47 INSTEAD.
ShowModels(x, y=NULL, covx=ifelse(is.null(empirical), diff(range(x))/5, max(empirical$c)), fixed.rs=TRUE, method=NULL, empirical=NULL, model=NULL, param=NULL, anisotropy = FALSE, all.param=NULL, legends = TRUE, register=0, Mean=NULL, erase=TRUE, x.fraction=0.60, cex.names=1, covx.default = 100, link.fct=NULL, Zlim=NULL, Col.rect="red", Col.bg="blue", Col.sep="grey", Col.line="red", Col.txt="black", Col.flash="red", Col.vario="blue", Col.main="black", Col.model=c("red", "black"), vario.lty=c(1,2), cex.leg = 0.7 * cex.names, cex.eval = 0.8 * cex.names, update=TRUE, screen.new=TRUE, use.outer.RFparameters=FALSE, debug=FALSE, ...)
x |
if |
y |
if |
covx |
if a single value is given, it is the largest distance for which the covariance functions or the variograms are plotted; otherwise the models are plotted for the given values, and the origin. |
fixed.rs |
if |
method |
simulation method, see RFMethods; if |
empirical |
empirical variogram; a list as returned by
|
model |
covariance model, see However, model can also be given by a simple list definition,
see |
param |
parameter vector:
|
anisotropy |
logical. If |
all.param |
In case of an anisotropic model the anisotropy matrix is by default diagonal with both entries equal to 1/\code{all.param[4]}. |
legends |
if |
register |
register where intermediate results of the simulations
are stored, see also |
Mean |
mean of the random field |
erase |
parameter of |
x.fraction |
the current screen is split into 2 x 2 screens.
The parameter |
cex.names |
font size for model names |
covx.default |
if |
link.fct |
|
Zlim |
Vector of two elements or list of two vectors of two elements. Graphical limits for the Gaussian random process (and the transformed field). |
Col.rect |
colour for interactive plot; see
|
Col.bg |
colour for interactive plot; see |
Col.sep |
colour for interactive plot; see |
Col.line |
colour for interactive plot; see
|
Col.txt |
colour for interactive plot; see |
Col.flash |
colour for the previously chosen model |
Col.vario |
colour for the empirical variogram plot |
Col.main |
colour for the title of the random field |
Col.model |
vector of two colours for plotting the variogram of the Gaussian random field and the transformed field |
vario.lty |
vector of two line types for primary and secondary axis of the variogram |
cex.leg |
font size used in the legends |
cex.eval |
font size used in the menue entries |
update |
logical. If |
screen.new |
logical. If |
use.outer.RFparameters |
logical.
If
|
debug |
logical. If |
... |
additional graphics options for the plot of the one- or
two-dimensional simulations, see |
The interactive plot consists of 3 parts:
top left: graph of the covariance function or the
variogram. In case empirical
is given the empirical
variogram is also plotted. If link.fct
is given, then also
the covariance function or the variogram is plotted. If the
correlation model is for a non-stationary random field,
the variogram for the transformed random field is not estimated in
a primitive way – this is indicated with a star in the legend
bottom left: one- or two-dimensional simulation
right:
– list of implemented models; a specific model is chosen by the left mouse button, or:
– menu for the parameters of the chosen model.
The list includes the variance, a nugget effect, the mean and the
scale or the anisotropy parameters. Further, some global parameters
can be changed. They are the PracticalRange
(see
RFparameters
for details) and the angle of the
main variogram direction (or NA, then it follows the angle of the
anisotropy). Finally, the user can choose between the plot of the
covariance and the corresponding variogram.
The interactive plot is left by clicking any mouse button different from the left when the top right part is active.
list of the last model and its parameters.
Martin Schlather, martin.schlather@math.uni-goettingen.de http://www.stochastik.math.uni-goettingen.de/~schlather
CovarianceFct
, eval.parameters
,
GaussRF
,
RFMethods
, RandomFields
.
## Not run: # first example: one-dimensional simulations # library(RandomFields) options(locatorBell=FALSE) x <- seq(1,10,0.1) ShowModels(x=x, covx=10, cov.def=100, type="l") x <- seq(1,10,0.1) ShowModels(x=x, y=x, covx=10, cov.def=100) # second example: two-dimensional simulations and # empirical variogram dx <- runif(300,0,8) dy <- runif(300,0,8) dz <- GaussRF(x=dx, y=dy, grid=FALSE, model="gaus", param=c(1,2,1,2)) ev <- EmpiricalVariogram(x=dx, y=dy, data=dz, grid=FALSE, bin=(-1:20)/4) x <- seq(1,5,0.1); ShowModels(x=x, y=x, empirical=ev) # third example: two-dimensional anistropic simulations and # link function x <- seq(1,10,0.1) ShowModels(x=x, y=x, link=function(x) exp(x), model=list(list(model="spheric", var=1, aniso=c(1,0,0,5)))) x <- seq(1,10,0.1) ShowModels(x=x, link=function(x) exp(x), model=list(list(model="spheric",var=1, scale=1))) x <- seq(1,10,0.1) ShowModels(x=x, link="MaxStable", fixed.rs=TRUE, model=list(list(model="gauss",var=1, scale=1)), type="l") ## End(Not run)