[Yuima-commits] r405 - pkg/yuima/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 16 13:08:03 CET 2016


Author: lorenzo
Date: 2016-02-16 13:08:03 +0100 (Tue, 16 Feb 2016)
New Revision: 405

Added:
   pkg/yuima/man/info.Output.Rd
   pkg/yuima/man/param.Output.Rd
   pkg/yuima/man/setMaps.Rd
   pkg/yuima/man/setMultiModel.Rd
   pkg/yuima/man/yuima.Output-class.Rd
   pkg/yuima/man/yuima.multimodel.Rd
Log:
Added Documentation

Added: pkg/yuima/man/info.Output.Rd
===================================================================
--- pkg/yuima/man/info.Output.Rd	                        (rev 0)
+++ pkg/yuima/man/info.Output.Rd	2016-02-16 12:08:03 UTC (rev 405)
@@ -0,0 +1,11 @@
+\name{info.Output-class}
+\docType{class}
+\alias{info.Output}
+\alias{info.Output-class}
+\alias{initialize,info.Output-method}
+
+\title{Class for information about Map/Operators}
+\description{
+Auxiliar class for definition of an object of class \code{\link{yuima.Output}}. see the documentation of \code{\link{yuima.Output}} for more details.
+}
+

Added: pkg/yuima/man/param.Output.Rd
===================================================================
--- pkg/yuima/man/param.Output.Rd	                        (rev 0)
+++ pkg/yuima/man/param.Output.Rd	2016-02-16 12:08:03 UTC (rev 405)
@@ -0,0 +1,11 @@
+\name{param.Output-class}
+\docType{class}
+\alias{param.Output}
+\alias{param.Output-class}
+\alias{initialize,param.Output-method}
+
+\title{Class for information about Map/Operators}
+\description{
+Auxiliar class for definition of an object of class \code{\link{yuima.Output}}. see the documentation of \code{\link{yuima.Output}} for more details.
+}
+

Added: pkg/yuima/man/setMaps.Rd
===================================================================
--- pkg/yuima/man/setMaps.Rd	                        (rev 0)
+++ pkg/yuima/man/setMaps.Rd	2016-02-16 12:08:03 UTC (rev 405)
@@ -0,0 +1,73 @@
+\name{setMaps}
+\alias{setMaps}
+\alias{Maps of SDE}
+\alias{Maps of yuima}
+%- Also NEED an '\alias' for EACH other topic documented here.
+\title{
+Maps of a Stochastic Differential Equation
+}
+\description{
+'\code{setMaps}' is the constructor of an object of class \code{\link{yuima.Output}} that describes a map of a SDE
+}
+\usage{
+setMaps(func, yuima, out.var = "", nrow = 1, ncol = 1)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+  \item{func}{a matrix or a vector of strings that describe each component of the map.}
+  \item{yuima}{ an object of class \code{\link{yuima.model}} that is the SDE.}
+  \item{out.var}{ label for the output}
+  \item{nrow}{ dimension of output if \code{func} is a vector of string. }
+  \item{ncol}{ dimension of output if \code{func} is a vector of string.}
+}
+%\details{
+%%  ~~ If necessary, more details than the description above ~~
+%}
+\value{The constructor returns an object of class \code{\link{yuima.Output}}.}
+\references{Yuima Documentation}
+\author{The YUIMA Project Team}
+%\note{
+%%  ~~further notes~~
+%}
+%% ~Make other sections like Warning with \section{Warning }{....} ~
+%\seealso{
+%% ~~objects to See Also as \code{\link{help}}, ~~~
+%}
+\examples{
+
+\dontrun{
+# Definition of a yuima model
+mod <- setModel(drift=c("a1", "a2"),
+  diffusion = matrix(c("s1","0","0","s2"),2,2),
+  solve.variable = c("X","Y"))
+
+# Definition of a map
+my.Map <- matrix(c("(X+Y)","-X-Y",
+  "a*exp(X-a1*t)","b*exp(Y-a2*t)"),
+  nrow=2,ncol=2)
+
+# Construction of yuima.Output
+
+yuimaMap <- setMaps(func = my.Map, yuima = mod,
+  out.var = c("f11","f21","f12","f22"))
+
+# Simulation of a Map
+
+set.seed(123)
+samp <- setSampling(0, 100,n = 1000)
+mypar <- list(a=1, b=1, s1=0.1, s2=0.2, a1=0.1, a2=0.1)
+sim1 <- simulate(object = yuimaMap, true.parameter = mypar,
+  sampling = samp)
+
+# plot
+
+plot(sim1, ylab = yuimaMap at Output@param at out.var,
+  main = "simulation Map", cex.main = 0.8)
+
+}
+
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.
+%\keyword{ ~kwd1 }
+%\keyword{ ~kwd2 }% __ONLY ONE__ keyword per line

Added: pkg/yuima/man/setMultiModel.Rd
===================================================================
--- pkg/yuima/man/setMultiModel.Rd	                        (rev 0)
+++ pkg/yuima/man/setMultiModel.Rd	2016-02-16 12:08:03 UTC (rev 405)
@@ -0,0 +1,178 @@
+\name{setMultiModel}
+\alias{setMultiModel}
+%- Also NEED an '\alias' for EACH other topic documented here.
+\title{
+Multidimensional Jump Diffusion Model
+}
+\description{
+'\code{setMultiModel}' generalizes \code{\link{setModel}} since it allows the user to construct a multidimensional Jump Diffusion Model where the jump noise is a multidimensional Levy process.
+}
+\usage{
+setMultiModel(drift = NULL, diffusion = NULL, hurst = 0.5, jump.coeff = NULL,
+  intensity = NULL, df = NULL, measure.type = character(),
+  state.variable = "x", jump.variable = "z", time.variable = "t",
+  solve.variable, xinit = NULL)
+}
+%- maybe also 'usage' for other objects documented here.
+\arguments{
+  \item{drift}{ see \code{\link{setModel}}.}
+  \item{diffusion}{ see \code{\link{setModel}}.}
+  \item{hurst}{ see \code{\link{setModel}}.}
+  \item{jump.coeff}{see \code{\link{setModel}}.}
+  \item{intensity}{ a string that indicates the label of intensity parameter. If \code{intensity = NULL} the Levy jumps are not CP type.}
+  \item{df}{ a list containing a density defined by user}
+  \item{measure.type}{ see \code{\link{setModel}}.}
+  \item{state.variable}{see \code{\link{setModel}}.}
+  \item{jump.variable}{see \code{\link{setModel}}.}
+  \item{time.variable}{see \code{\link{setModel}}.}
+  \item{solve.variable}{see \code{\link{setModel}}.}
+  \item{xinit}{see \code{\link{setModel}}.}
+}
+\details{The user has to specify its proper function for multivariate density and random number generator}
+\value{The function returns an object of class \code{\link{yuima.multimodel}}.}
+%\references{
+%% ~put references to the literature/web site here ~
+%}
+\author{YUIMA Team}
+%\note{
+%%  ~~further notes~~
+%}
+%% ~Make other sections like Warning with \section{Warning }{....} ~
+%\seealso{
+%% ~~objects to See Also as \code{\link{help}}, ~~~
+%}
+\examples{
+\dontrun{
+# We define the density function of the underlying Levy
+
+dmyexp <- function(z, sig1, sig2, sig3){
+  rep(0,3)
+}
+
+# We define the random number generator
+
+rmyexp <- function(z, sig1, sig2, sig3){
+  cbind(rnorm(z,0,sig1), rgamma(z,1,sig2), rnorm(z,0,sig3))
+}
+
+# Model Definition: in this case we consider only a multi
+# compound poisson process with a common intensity as underlying
+# noise
+
+mod <- setMultiModel(drift = matrix(c("0","0","0"),3,1), diffusion = NULL,
+  jump.coeff = matrix(c("1","0","0","0","1","-1","1","0","0"),3,3),
+  intensity = c("lambda1"), df = list("dmyexp(z,sig1,sig2,sig3)"),
+  jump.variable = c("z"), measure.type=c("CP"),
+  solve.variable=c("X1","X2","X3"))
+
+# Sample scheme
+
+samp<-setSampling(0,100,n=1000)
+param <- list(lambda1 = 1, sig1 = 0.1, sig2 = 0.1, sig3 = 0.1)
+
+# Simulation
+
+traj <- simulate(object = mod, sampling = samp,
+  true.parameter = param)
+
+# Plot
+
+plot(traj, main = " driven noise. Multidimensional CP",
+  cex.main = 0.8)
+
+# We construct a multidimensional SDE driven by a multivariate
+# levy process without CP components.
+
+# Definition multivariate density
+
+dmyexp1 <- function(z, sig1, sig2, sig3){
+  rep(0,3)
+}
+
+# Definition of random number generator
+# In this case user must define the delta parameter in order to
+# control the effect of time interval in the simulation.
+
+rmyexp1 <- function(z, sig1, sig2, sig3, delta){
+  cbind(rexp(z,sig1*delta), rgamma(z,1*delta,sig2), rexp(z,sig3*delta))
+}
+
+# Model defintion
+
+mod1 <- setMultiModel(drift=matrix(c("0.1*(0.01-X1)",
+  "0.05*(1-X2)","0.1*(0.1-X3)"),3,1), diffusion=NULL,
+   jump.coeff = matrix(c("0.01","0","0","0","0.01",
+                          "0","0","0","0.01"),3,3),
+   df=list("dmyexp1(z,sig1,sig2,sig3)"),
+   jump.variable = c("z"), measure.type=c("code"),
+   solve.variable=c("X1","X2","X3"),xinit=c("10","1.2","10"))
+
+# Simulation sample paths
+
+samp<-setSampling(0,100,n=1000)
+param <- list(sig1 = 1, sig2 = 1, sig3 = 1)
+
+# Simulation
+
+set.seed(1)
+traj1 <- simulate(object = mod1, sampling = samp,
+  true.parameter = param)
+
+# Plot
+
+plot(traj1, main = "driven noise: multi Levy without CP",
+  cex.main = 0.8)
+
+# We construct a multidimensional SDE driven by a multivariate
+# levy process.
+
+# We consider a mixed situation where some
+# noise are driven by a multivariate Compuond Poisson that
+# shares a common intensity parameters.
+
+### Multi Levy model
+
+rmyexample2<-function(z,sig1,sig2,sig3, delta){
+    if(missing(delta)){
+      delta<-1
+    }
+    cbind(rexp(z,sig1*delta), rgamma(z,1*delta,sig2),
+        rexp(z,sig3*delta), rep(1,z),
+        rep(1,z))
+}
+
+dmyexample2<-function(z,sig1,sig2,sig3){
+  rep(0,5)
+}
+
+# Definition Model
+
+mod2 <- setMultiModel(drift=matrix(c("0.1*(0.01-X1)",
+  "0.05*(1-X2)","0.1*(0.1-X3)", "0", "0"),5,1), diffusion=NULL,
+  jump.coeff = matrix(c("0.01","0","0","0","0",
+                        "0","0.01","0","0","0",
+                        "0","0","0.01","0","0",
+                        "0","0","0","0.01","0",
+                        "0","0","0","0","0.01"),5,5),
+  df = list("dmyexample2(z,sig1,sig2,sig3)"),
+  intensity = c("lambda1"), jump.variable = c("z"),
+  measure.type=c("code","code","code","CP","CP"),
+  solve.variable=c("X1","X2","X3","X4","X5"),
+  xinit=c("10","1.2","10","0","0"))
+
+# Simulation scheme
+samp <- setSampling(0, 100, n = 1000)
+param <- list(sig1 = 1, sig2 = 1, sig3 = 1, lambda1 = 1)
+
+# Simulation
+
+set.seed(1)
+traj2 <- simulate(object = mod2, sampling = samp,
+  true.parameter = param)
+
+plot(traj2, main = "driven noise: general multi Levy", cex.main = 0.8)
+
+}
+}
+% Add one or more standard keywords, see file 'KEYWORDS' in the
+% R documentation directory.

Added: pkg/yuima/man/yuima.Output-class.Rd
===================================================================
--- pkg/yuima/man/yuima.Output-class.Rd	                        (rev 0)
+++ pkg/yuima/man/yuima.Output-class.Rd	2016-02-16 12:08:03 UTC (rev 405)
@@ -0,0 +1,56 @@
+\name{yuima.Output-class}
+\docType{class}
+\alias{yuima.Output-class}
+\alias{yuima.Output}
+%\alias{info.Output}
+%\alias{param.Output}
+\alias{initialize,yuima.Output-method}
+\alias{simulate,yuima.Output-method}
+
+
+\title{Class for the mathematical description of function of a stochastic process}
+\description{
+  The \code{yuima.Output} class is a class of the  \pkg{yuima} package that extends the \code{\link{yuima-class}} it represents a map of a stochastic process
+
+  \code{ zt = g(theta, Xt, t) : R^{q x d x 1} -> R^{l1 x l2 x ...}}
+
+or an operator between two independent stochasic process:
+
+  \code{ zt = h(theta, Xt, Yt, t)}
+
+where \code{Xt} and \code{Yt}  areobject of class \code{\link{yuima.model-class}} or \code{\link{yuima-class}} with the same dimension.
+}
+
+\section{Slots}{
+Here we report the additional slots of an object of class \code{yuima.Output} with respect to the \code{\link{yuima-class}}:
+  \describe{
+    \item{\code{Output}:}{It is an object of class \code{info.Output} and it is composed by the following slots:
+    \describe{
+        \item{\code{formula}:}{It is a \code{list} that contains the components of map \code{g(theta, Xt, t)} or the operator \code{h(theta, Xt, Yt, t)} }
+        \item{\code{dimension}:}{a \code{numeric} object that is the dimensions of the output.}
+        \item{\code{type}:}{If \code{type = "Maps"}, the output is a map of stochastic process, If \code{type = "Operator"}, the result is an operator between two independent stochastic process}
+       \item{\code{param}}{it is an object of class \code{param.Output} and it is composed by the following slots:
+       \describe{
+          \item{\code{out.var}:}{labels for output.}
+          \item{\code{allparam}:}{labels of all parameters (model and  map/operators).}
+          \item{\code{allparamMap}:}{labels of map/operator parameters.}
+          \item{\code{common}:}{common parameters.}
+          \item{\code{Input.var}:}{labels for inputs.}
+          \item{\code{time.var}:}{label for time variable.}
+        }
+       }
+      }
+    }
+  }
+}
+
+\section{Methods}{
+  \describe{
+    \item{simulate}{simulation method. For more information see
+	  \code{\link{simulate}}.}
+%    \item{toLatex}{This method converts an object of \code{yuima.poisson-class} to character vectors with LaTeX markup.}
+%    \item{qmle}{Quasi maximum likelihood estimation procedure. For more information see \code{\link{qmle}}. }
+  }
+}
+\author{The YUIMA Project Team}
+\keyword{classes}

Added: pkg/yuima/man/yuima.multimodel.Rd
===================================================================
--- pkg/yuima/man/yuima.multimodel.Rd	                        (rev 0)
+++ pkg/yuima/man/yuima.multimodel.Rd	2016-02-16 12:08:03 UTC (rev 405)
@@ -0,0 +1,54 @@
+\name{yuima.multimodel-class}
+\docType{class}
+\alias{yuima.multimodel-class}
+\alias{yuima.multimodel}
+\alias{initialize,yuima.multimodel-method}
+\alias{simulate,yuima.multimodel-method}
+
+\title{Class for the mathematical description of Multi dimensional Jump Diffusion processes}
+\description{
+  The \code{yuima.multimodel} class is a class of the  \pkg{yuima} package that extends the \code{\link{yuima.model-class}}.
+}
+\section{Slots}{
+  \describe{
+    \item{\code{drift}:}{always \code{expression((0))}.}
+    \item{\code{diffusion}:}{a list of \code{expression((0))}.}
+    \item{\code{hurst}:}{always \code{h=0.5}, but ignored for this model.}
+    \item{\code{jump.coeff}:}{set according to \code{scale} in \code{\link{setPoisson}}.}
+    \item{\code{measure}:}{a list containting the intensity measure and the jump distribution.}
+    \item{\code{measure.type}:}{always \code{"CP"}.}
+    \item{state.variable}{a vector of names identifying the names used to
+     denote the state variable in the drift and diffusion specifications.}
+    \item{\code{parameter}:}{which is a short name for ``parameters'', is an
+	 object of class \code{\link{model.parameter-class}}. For more details see
+	 \code{\link{model.parameter-class}} documentation page.}
+    \item{\code{state.variable}:}{identifies the state variables in the \R{}
+     expression.}
+    \item{\code{jump.variable}:}{identifies the variable for the jump
+	 coefficient.}
+    \item{\code{time.variable}:}{the time variable.}
+    \item{\code{noise.number}:}{denotes the number of sources of noise.}
+    \item{\code{equation.number}:}{denotes the dimension of the stochastic
+     differential equation.}
+    \item{\code{dimension}:}{the dimensions of the parameter given in the
+     \code{parameter} slot.}
+    \item{\code{solve.variable}:}{identifies the variable with respect to which
+	 the stochastic differential equation has to be solved.}
+    \item{\code{xinit}:}{contains the initial value of the stochastic
+	 differential equation.}
+    \item{\code{J.flag}:}{wheather jump.coeff include jump.variable.}
+  }
+}
+\section{Methods}{
+  \describe{
+    \item{simulate}{simulation method. For more information see
+	  \code{\link{simulate}}.}
+%    \item{toLatex}{This method converts an object of \code{yuima.poisson-class} to character vectors with LaTeX markup.}
+    \item{qmle}{Quasi maximum likelihood estimation procedure. For more information see \code{\link{qmle}}. }
+  }
+}
+\author{The YUIMA Project Team}
+\keyword{classes}
+
+
+



More information about the Yuima-commits mailing list