1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330
|
\name{RandomFields-package}
\alias{RandomFields}
\alias{RandomFields-package}
\docType{package}
\title{Simulation and Analysis of Random Fields}
\description{
The package \code{RandomFields} offers various tools for
\enumerate{
\item{\bold{model estimation (ML) and inference (tests)}}
for regionalized variables and data analysis,
\item{\bold{simulation}} of different kinds
of random fields, including
\itemize{
\item multivariate, spatial, spatio-temporal, and non-stationary
Gaussian random fields,
\item Poisson fields, binary fields, Chi2 fields, t fields and
\item max-stable fields.
}
It can also deal with non-stationarity and anisotropy of these
processes and conditional simulation (for Gaussian random fields,
currently).
% \item{\bold{model estimation}} for (geostatistical) linear (mixed) models
}
See \mysoftware
for \bold{intermediate updates}.
}
\details{
The following features are provided by the package:
\enumerate{
\item \bold{Bayesian Modelling}
\itemize{
\item See \link{Bayesian Modelling} for an introduction to
hierarchical modelling.
}
\item \bold{Coordinate systems}
\itemize{
\item Cartesian, earth and spherical coordinates are
recognized, see \link{coordinate systems} for details.
\item A list of valid models is given by
\link{spherical models}.
}
\item \bold{Data and example studies}:
Some data sets and published code are provided to illustrate the
syntax and structure of the package functions.
\itemize{
\item \code{\link{soil}} : soil physical data
\item \code{\link{weather}} : UWME weather data
\item \code{\link{papers}} : code used in the papers published by
the author(s)
}
\item \bold{Estimation of parameters (for second-order random fields)}
\itemize{
\item \command{\link{RFfit}} : general function for estimating
parameters; (for Gaussian random fields)
\item \command{\link{RFhurst}} : estimation of the Hurst parameter
\item \command{\link{RFfractaldim}} : estimation of the fractal
dimension
\item \command{\link{RFvariogram}} : calculates
the empirical variogram
\item \command{\link{RFcov}} : calculates
the empirical (auto-)covariance function
}
\item \bold{Graphics}
\itemize{
\item Fitting a covariance function manually
\command{\link{RFgui}}
\item the generic function \command{\link[graphics]{plot}}
\item global graphical parameters with \command{\link{RFpar}}
}
\item \bold{Inference (for Gaussian random fields)}
\itemize{
\item \command{\link{RFcrossvalidate}} : cross validation
\item \command{\link{RFlikelihood}} : likelihood
\item \command{\link{RFratiotest}} : likelihood ratio test
\item \command{\link[=AIC.RF_fit]{AIC}},
\command{\link[=AICc.RF_fit]{AICc}},
\command{\link[=BIC.RF_fit]{BIC}}, \command{\link[=anova.RF_fit]{anova}},
\command{\link[=logLik.RFfit]{logLik}}
}
\item \bold{Models}
\itemize{
\item For an introduction and general properties, see
\link{RMmodels}.
\item For an overview over classes of
covariance and variogram models --e.g. for
\bold{geostatistical} purposes-- see \link{RM}. More
sophisticated models
and covariance function operators are included.
% \item To apply the offered package procedures to \bold{mixed models}
% -- e.g. appearing in genetical data analysis-- see
\item \command{\link{RFformula}} reports a new style of passing a
model since version 3.3.
\item definite models are evaluated by \command{\link{RFcov}},
\command{\link{RFvariogram}} and \command{\link{RFcovmatrix}}.
For a quick impression use \code{\link{plot}(model)}.
\item non-definite models are evaluated by \command{\link{RFfctn}} and
\command{\link{RFcalc}}
\item \command{\link{RFlinearpart}} returns the linear part of a
model
\item \command{\link{RFboxcox}} deals explicitly with Box-Cox
transformations. In many cases it is performed implicitly.
}
\item \bold{Prediction (for second-order random fields)}
\itemize{
\item \command{\link{RFinterpolate}} : kriging, including imputing
}
\item \bold{Simulation}
\itemize{
\item \command{\link{RFsimulate}}: Simulation
of random fields,
including conditional simulation. For a list of all covariance
functions and variogram models see \command{\link{RM}}.
Use \command{\link{plot}} for visualisation of the result.
}
\item \bold{S3 and S4 objects}
\itemize{
\item The functions return S4 objects
based on the package \pkg{sp},
if \code{\link[=RFoptions]{spConform=TRUE}}.
This is the default.
If \code{\link[=RFoptions]{spConform=FALSE}},
simple objects as in version 2 are returned.
These simple objects are frequently provided with an S3 class.
This option makes the returning procedure much faster, but
currently does not allow for the comfortable use of
\command{\link[=plot-method]{plot}}.
\item \command{\link[graphics]{plot}},
\command{\link[base]{print}}, \command{\link[base]{summary}},
sometimes also \command{\link[utils]{str}} recognise these S3 and S4
objects
\item use \command{\link{sp2RF}} for an explicit transformation
of \pkg{sp} objects to S4 objects of \pkg{RandomFields}.
\item
Further generic functions are available for fitted models,
see \sQuote{Inference} above.
% \item \bold{Note} that, in many cases, \command{print} will return
% an invisible list. This list contains the main information of the
% S4 object in an accessible way and is in many cases the
% information obtained from \code{summary}. See examples below.
}
\item \bold{Xtended} features, especially for package programmers
\itemize{
\item might decide on a large variety of arguments of the
simulation and estimation procedures using the function
\command{\link{RFoptions}}
\item may use \sQuote{./configure
--with-tcl-config=/usr/lib/tcl8.5/tclConfig.sh
--with-tk-config=/usr/lib/tk8.5/tkConfig.sh} to configure R
}
}
}
\section{Changings}{
A list of major changings from Version 2 to Version 3 can be found
in \link{MajorRevisions}.
\link{Changings} lists some further changings, in particular of
argument and argument names.
\pkg{RandomFields} should be rather
stable when running it with \pkg{parallel}.
However \pkg{RandomFields} might crash severely if an error occurs
when running in parallel. When used with \pkg{parallel},
you might set \code{RFoptions(cores = 1)}. Note that
\code{RFoptions(cores = ...)} with more than 1 core uses another level
of parallelism which will be in competetions with \pkg{parallel}
during runtime.
}
% In the beta version, the following functionalities are currently
% not available:
% \itemize{
% \item \command{\link{ShowModels}}
% \item numerical evaluation of the covariance function in tbm2
% \item Harvard Rue's Markov fields
% }
\seealso{
See also \link{RF}, \link{RM}, \link{RP}, \link{RR}, \link{RC}, \link{R.}
}
\note{
The following packages enable further choices for the optimizer
(instead of \command{optim}) in RandomFields:
\pkg{optimx}, \pkg{soma}, \pkg{GenSA}, \pkg{minqa}, \pkg{pso},
\pkg{DEoptim}, \pkg{nloptr}, \pkg{RColorBrewer}, \pkg{colorspace}
}
\section{Update}{
Current updates are available through \mysoftware.
}
\me
\references{
\itemize{
\item
Singleton, R.C. (1979). In \emph{Programs for Digital Signal Processing}
Ed.: Digital Signal Processing Committee and IEEE Acoustics,
Speech, and Signal Processing Committe (1979)
IEEE press.
\item
Schlather, M., Malinowski, A., Menck, P.J., Oesting, M. and
Strokorb, K. (2015)
Analysis, simulation and prediction of multivariate
random fields with package \pkg{RandomFields}. \emph{
Journal of Statistical Software}, \bold{63} (8), 1-25,
url = \sQuote{http://www.jstatsoft.org/v63/i08/}
\item
see also the corresponding \href{../doc/multivariate_jss.pdf}{vignette}.
}
}
\section{Contributions}{
\itemize{
\item Contributions to version 3.0 and following:\cr
Felix Ballani (TU Bergakademie Freiberg; Poisson Polygons, 2014) \cr
Daphne Boecker (Univ. Goettingen; RFgui, 2011)\cr
Katharina Burmeister (Univ. Goettingen; testing, 2012)\cr
Sebastian Engelke (Univ. Goettingen; RFvariogram, 2011-12)\cr
Sebastian Gross (Univ. Goettingen; tilde formulae, 2011)\cr
Alexander Malinowski (Univ. Mannheim; S3, S4 classes 2011-13)\cr
Juliane Manitz (Univ. Goettingen; testing, 2012)\cr
Johannes Martini (Univ. Goettingen; RFvariogram,
2011-12)\cr
Ulrike Ober (Univ. Goettingen; help pages, testing, 2011-12)\cr
Marco Oesting (Univ. Mannheim; Brown-Resnick processes, Kriging, Trend,
2011-13)\cr
Paulo Ribeiro (Unversidade Federal do Parana; code adopted
from \pkg{geoR}, 2014)\cr
Kirstin Strokorb (Univ. Mannheim; help pages, 2011-13)\cr
\item Contributions to version 2.0 and following:\cr
Peter Menck (Univ. Goettingen; multivariate circulant embedding)\cr
R Core Team, Richard Singleton (fft.c and advice)
\item Contributions to version 1 and following:\cr
Ben Pfaff, 12167 Airport Rd, DeWitt MI 48820, USA making available
an algorithm for AVL trees (avltr*)
}
}
\section{Thanks}{
Patrick Brown : comments on Version 3\cr
Paulo Ribeiro : comments on Version 1\cr
Martin Maechler : advice for Version 1
}
\section{Financial support}{
\itemize{
\item
V3.0 has been financially supported by the German Science Foundation
(DFG) through the Research Training Group 1953 \sQuote{Statistical
Modeling of Complex Systems and Processes --- Advanced Nonparametric
Approaches} (2013-2018).
\item
V3.0 has been financially supported by Volkswagen Stiftung within
the project \sQuote{WEX-MOP} (2011-2014).
\item
Alpha versions for V3.0 have been
financially supported by the German Science Foundation (DFG) through the
Research Training Groups 1644 \sQuote{Scaling problems in Statistics}
and 1023 \sQuote{Identification in Mathematical Models} (2008-13).
\item
V1.0 has been financially supported by
the German Federal Ministry of Research and Technology
(BMFT) grant PT BEO 51-0339476C during 2000-03.
\item
V1.0 has been financially supported by the EU TMR network
ERB-FMRX-CT96-0095 on
``Computational and statistical methods for the analysis of spatial
data'' in 1999.
}
}
\keyword{spatial}
\examples{\dontshow{StartExample(reduced=FALSE)}
RFoptions(seed=0) ## *ANY* simulation will have the random seed 0; set
## RFoptions(seed=NA) to make them all random again
# simulate some data first (Gaussian random field with exponential
# covariance; 6 realisations)
model <- RMexp()
x <- seq(0, 10, 0.1)
z <- RFsimulate(model, x, x, n=6)
## select some data from the simulated data
xy <- coordinates(z)
pts <- sample(nrow(xy), min(100, nrow(xy) / 2))
dta <- matrix(nrow=nrow(xy), as.vector(z))[pts, ]
dta <- cbind(xy[pts, ], dta)
plot(z, dta)
## re-estimate the parameter (true values are 1)
estmodel <- RMexp(var=NA, scale=NA)
(fit <- RFfit(estmodel, data=dta))
## show a kriged field based on the estimated parameters
kriged <- RFinterpolate(fit, x, x, data=dta)
plot(kriged, dta)
\dontshow{FinalizeExample()}}
|