[Yuima-commits] r232 - pkg/yuimadocs/inst/doc/JSS

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Mar 5 23:54:22 CET 2013


Author: iacus
Date: 2013-03-05 23:54:21 +0100 (Tue, 05 Mar 2013)
New Revision: 232

Modified:
   pkg/yuimadocs/inst/doc/JSS/article-new.Rnw
   pkg/yuimadocs/inst/doc/JSS/bibliography.bib
Log:
update revision

Modified: pkg/yuimadocs/inst/doc/JSS/article-new.Rnw
===================================================================
--- pkg/yuimadocs/inst/doc/JSS/article-new.Rnw	2013-02-11 01:04:12 UTC (rev 231)
+++ pkg/yuimadocs/inst/doc/JSS/article-new.Rnw	2013-03-05 22:54:21 UTC (rev 232)
@@ -14,7 +14,7 @@
 \SweaveOpts{prefix.string=yuima, echo=TRUE, eval=FALSE}
 
 % USE THIS INSTEAD IF YOU WANT TO EXECUTE R CODE
-%\SweaveOpts{prefix.string=yuima, echo=TRUE, eval=TRUE}
+\SweaveOpts{prefix.string=yuima, echo=TRUE, eval=TRUE}
 
 %% before editing this file get the new version, type this command on Terminal
 %% in the same directory where this Rnw-file lives
@@ -46,6 +46,14 @@
 \usepackage{latexsym}
 \usepackage{amsmath}
 
+\def\be{\begin{equation}}
+\def\ee{\end{equation}}
+\def\bea{\begin{eqnarray}}
+\def\eea{\end{eqnarray}}
+\def\beas{\begin{eqnarray*}}
+\def\eeas{\end{eqnarray*}}
+\def\sskip{\hspace{5mm}}
+
 \newcommand{\colorr}{\color[rgb]{0.8,0,0}}
 \newcommand{\colorg}{\color[rgb]{0,0.5,0}}
 \newcommand{\colorb}{\color[rgb]{0,0,0.8}}
@@ -68,6 +76,7 @@
         Yuta Koike\\The University of Tokyo\And
         Hiroki Masuda\\Kyushu University \And
         Ryosuke Nomura\\The University of Tokyo\AND
+        Teppei Ogihara\\Osaka University \And
         Yasutaka Shimuzu\\Osaka University \And
         Masayuki Uchida\\Osaka University \And
         Nakahiro Yoshida\\The University of Tokyo 
@@ -160,17 +169,14 @@
 
 
 \section{Introduction}
-The plan of the YUIMA Project is to define the bases for a complete environment for simulation and inference for stochastic processes via an \proglang{R} \citep{ERRE} package called \pkg{yuima}.
- The package \pkg{yuima} provides 
-an object-oriented programming environment 
-for simulation and statistical inference 
-for stochastic processes by \proglang{R}.
+The plan of the YUIMA Project is to construct the bases for a complete environment for simulation and inference for stochastic processes via an \proglang{R} \citep{ERRE} package called \pkg{yuima}.
+% The package \pkg{yuima} provides an object-oriented programming environment for simulation and statistical inference for stochastic processes by \proglang{R}.
 The \pkg{yuima} package adopts the  S4 system of classes and methods \citep{chambers98}.
  
 Under this framework, 
 the \pkg{yuima} package also supplies various functions 
-to execute simulation and statistical analysis. 
-Both categories of procedures may depend \textcolor{red}{on} each other.
+to carry out simulation and statistical analysis. 
+Both categories of procedures may depend on each other.
 Statistical inference often requires a simulation technique 
 as a subroutine, and a certain simulation method 
 needs to fix a tuning parameter by applying 
@@ -186,7 +192,7 @@
 commonly used 
 to model random evolution along continuous or 
 practically continuous time, such as 
-the random movements of a stock price. 
+the random movements of stock prices. 
 Theory of statistical inference for 
 stochastic differential equations already has a fairly long history, 
 more than three decades, but it is still developing quickly new 
@@ -194,27 +200,30 @@
 The formulas produced by the theory are usually very sophisticated, 
 which makes it difficult for standard users not necessarily 
 familiar with this field to enjoy utilities. 
-\textcolor{red}{For example, by taking advantage of the analytic approach,  the asymptotic expansion method for computing 
+For example, by taking advantage of the analytic approach,  the asymptotic expansion method for computing 
 option prices (i.e., expectation of an irregular functional of 
 a stochastic process) provides precise approximation values 
-instantaneously. The expansion formula, which has a long expression involving more than 900 terms of multiple integrals, is already coded in the \pkg{yuima} package for generic diffusion processes.}
+instantaneously. The expansion formula, which has a long expression involving more than 900 terms of multiple integrals, is already coded in the \pkg{yuima} package for generic diffusion processes.
 
 
 The \pkg{yuima} package delivers up-to-date methods as a package 
 onto the desk of the user working 
 with simulation and/or statistics for stochastic differential equations. 
-In the \pkg{yuima} package stochastic differential equations can be of very abstract type, 
+In the \pkg{yuima} package, stochastic differential equations can be of very abstract type, 
 multidimensional, driven by Wiener process or fractional Brownian motion 
 with general Hurst parameter, with or without jumps specified as L\'evy noise. 
 
 
 
-The \pkg{yuima} package is intended to offer the basic infrastructure on which complex models and inference procedures can be built on. This paper explains the design of the \pkg{yuima} package and provides some examples of applications.
-The paper is organised as follows. Section \ref{sec2} is an overview about the package. Section \ref{sec3} describe the way models are specified in \pkg{yuima}. Section \ref{sec4} explains asymptotic expansion methods. Section \ref{sec5} is a review of basic inference procedures. Finally, Section \ref{sec6} explains additional details and the roadmap of the YUIMA Project.
+The \pkg{yuima} package is intended to offer the basic infrastructure on which complex models and inference procedures can be built on. This paper explains the design of the \pkg{yuima} package and illustrates some examples of applications.
+The paper is organized as follows. Section \ref{sec2} is an overview about the package. Section \ref{sec3} describes the way in which models are specified in \pkg{yuima}. Section \ref{sec4} explains asymptotic expansion methods. Section \ref{sec5} is a review of basic inference procedures. 
+Finally, Section \ref{sec6} gives additional details and the roadmap of the YUIMA Project.
 
 
-Although we assume that the reader of this paper has a basic knowledge of the \proglang{R} language, most of the examples are easy to be understood by anyone.
- 
+Although we assume that the reader of this paper has a basic knowledge of the \proglang{R} language, most of the examples are easy to understand 
+if he/she knows stochastic differential equations intuitively or symbolically. 
+
+
 \section{The \pkg{yuima} Package}\label{sec2}
 The package \pkg{yuima} depends on some other packages, like  \pkg{zoo} \citep{zoo}, which can be installed separately.
 The package \pkg{zoo} is used internally to store time series data. This dependence may change in the future adopting a more flexible class for internal storage of time series.
@@ -241,25 +250,25 @@
 \label{fig:classes}
 \end{figure} 
 The different slots do not need to be all present at the same time. For example, in case one wants to simulate a stochastic process, only the slots \code{model} and \code{sampling} should be present, while the slot \code{data} will be filled by the simulator.
-We discuss in details the \textcolor{red}{different objects} separately in the next sections.
+We discuss in details the different objects separately in the next sections.
 
-\textcolor{blue}{The general idea of the \pkg{yuima} package is to separate into different subclass objects the statistical model, the data and the statistical methods. As will be explained with several examples, the user may give a mathematical description of the statistical model with \code{setModel} which prepares a \code{yuima.model} object by filling the appropriate slots. If the aim is the simulation of the solution of the stochastic  differential equation specified in the \code{yuima.model} object then, using the method \code{simulate}, it is possible to obtain one trajectory of the process. As an output, a \code{yuima} object is created which contains the original model specified in the \code{yuima.model} object in the slot named \code{model} and two additional slots named \code{data}, for the simulated data, and \code{sampling} which contains the description of the simulation scheme used as well as other informations. The details of \code{simulate} will be explained in Section \ref{sec:simul} along with the use of method \code{setSampling} which allows to specify the type of sampling scheme to be used by the \code{simulate} method.
+The general idea of the \pkg{yuima} package is to separate into different subclass objects the statistical model, the data and the statistical methods. As will be explained with several examples, the user may give a mathematical description of the statistical model with \code{setModel} which prepares a \code{yuima.model} object by filling the appropriate slots. If the aim is the simulation of the solution of the stochastic  differential equation specified in the \code{yuima.model} object then, using the method \code{simulate}, it is possible to obtain one trajectory of the process. As an output, a \code{yuima} object is created which contains the original model specified in the \code{yuima.model} object in the slot named \code{model} and two additional slots named \code{data}, for the simulated data, and \code{sampling} which contains the description of the simulation scheme used as well as other informations. The details of \code{simulate} will be explained in Section \ref{sec:simul} along with the use of method \code{setSampling} which allows to specify the type of sampling scheme to be used by the \code{simulate} method.
 But \code{yuima} object may contain the slot \code{data} non only as the outcome of \code{simulate} but also because the user decides to analyse its own data. In this case the method \code{setData} is used to transform most types  of \proglang{R} time series object into a a proper \code{yuima.data} object.
 When the slots \code{data} and \code{model} are available, many other methods can be used to perform statistical analysis on these sde's models. These methods will be discussed in Section \ref{sec5}.
-Further, functionals of stochastic differential equations can be defined using the \code{setFunctional} method and evaluated using asymptotc expansion methods as explained in Section \ref{sec4}. The \code{setFunctional} method creates a \code{yuima.functional} object which is included along with a \code{yuima.model}  into a \code{yuima} object in order to be used for the evaluation of its asymptotic expansion.}
+Further, functionals of stochastic differential equations can be defined using the \code{setFunctional} method and evaluated using asymptotc expansion methods as explained in Section \ref{sec4}. The \code{setFunctional} method creates a \code{yuima.functional} object which is included along with a \code{yuima.model}  into a \code{yuima} object in order to be used for the evaluation of its asymptotic expansion.
 
 
 \subsection{The \code{yuima.model} Class}\label{sec:model}
-At present, in \pkg{yuima}  three main classes of stochastic differential equations  can be easily specified. \textcolor{blue}{Here we present  a brief
-overview of these models as they will be described in details in Section \ref{sec3}, but this allow to introduce an overall view of the slots of the \code{yuima.model} class.} 
-\textcolor{blue}{In \pkg{yuima} one can describe three main families of stochastic processes at present. These models can be one or multidimensional and eventually described as parametric models. Let $X_0=x_0$ be the initial value of the process, then, the main classes are as follows:}
+At present, in \pkg{yuima}  three main classes of stochastic differential equations  can be easily specified.  Here we present  a brief
+overview of these models as they will be described in details in Section \ref{sec3}, but this allow to introduce an overall view of the slots of the \code{yuima.model} class.
+In \pkg{yuima} one can describe three main families of stochastic processes at present. These models can be one or multidimensional and eventually described as parametric models. Let $X_0=x_0$ be the initial value of the process, then, the main classes are as follows:
 \begin{itemize}
-\item \textcolor{blue}{diffusion models described as} 
+\item diffusion models described as
 $$  \de X_t=a(t,X_t,\theta)dt + b(t,X_t,\theta)\de W_t, \quad X_0=x_0$$
  where $W_t$ is a standard Brownian motion;
-\item \textcolor{blue}{sde's driven by fractional Gaussian noise, with $H$ the Hurst parameter, described as}
+\item sde's driven by fractional Gaussian noise, with $H$ the Hurst parameter, described as
 $$ \de X_t=a(t,X_t,\theta)dt + b(t,X_t,\theta)\de W_t^{H}, \quad X_0=x_0;$$ 
-\item \textcolor{blue}{diffusion process with jumps} and  L\'evy processes solution to
+\item diffusion process with jumps and  L\'evy processes solution to
 $$
 \begin{aligned}
 \de X_t = & \,\,\, a(t,X_t,\theta)\de t + b(t,X_t,\theta)\de W_t + \int\limits_{|z|>1}\!\!\! c(X_{t-},z)\mu(\de t,\de z) \\
@@ -267,8 +276,8 @@
 \end{aligned}, \quad X_0=x_0;
 $$
 \end{itemize}
-\textcolor{blue}{The functions $a(\cdot)$, $b(\cdot)$ and $c(\cdot)$ may have a different number of arguments. For example, if the model is homogeneous in time and drift and diffusion coefficients are entirely specified, then we will use the notaion $a(x)$ and $b(x)$ and describe the diffusion model simply as $\displaystyle \de X_t=a(X_t)dt + b(X_t)\de W_t$. And so forth. Detailed hypotheses and regularity conditions on the coefficients $a(\cdot)$, $b(\cdot)$ and $c(\cdot)$ for each class of models will be given in the next sections. Nevertheless, it is important to remark that these notations only matter the mathematical description of the model while each coefficient is passed to \pkg{yuima} methods as \proglang{R} mathematical expressions. It means that, for example, $a(t, X_t, \theta) = t\cdot \sqrt{\theta X_t}$ will be passed as \code{t*sqrt(x*theta)}, therefore, the order of the arguments is not relevant to \proglang{R} as well as its mathematical description as long as it is consistent through each specific section. Furhter, \pkg{yuima} is able to accept any user-specified notation for the state variable $x$ (for $X_t$) and the time variable $t$ and the remaining term of an \proglang{R} expression will be interpreted as parameter as will explained in Section \ref{sec:diff}.
-We are now able to give an overview of the mian slots of the most important class of the \pkg{yuima} package.}
+ The functions $a(\cdot)$, $b(\cdot)$ and $c(\cdot)$ may have a different number of arguments. For example, if the model is homogeneous in time and drift and diffusion coefficients are entirely specified, then we will use the notaion $a(x)$ and $b(x)$ and describe the diffusion model simply as $\displaystyle \de X_t=a(X_t)dt + b(X_t)\de W_t$. And so forth. Detailed hypotheses and regularity conditions on the coefficients $a(\cdot)$, $b(\cdot)$ and $c(\cdot)$ for each class of models will be given in the next sections. Nevertheless, it is important to remark that these notations only matter the mathematical description of the model while each coefficient is passed to \pkg{yuima} methods as \proglang{R} mathematical expressions. It means that, for example, $a(t, X_t, \theta) = t\cdot \sqrt{\theta X_t}$ will be passed as \code{t*sqrt(x*theta)}, therefore, the order of the arguments is not relevant to \proglang{R} as well as its mathematical description as long as it is consistent through each specific section. Furhter, \pkg{yuima} is able to accept any user-specified notation for the state variable $x$ (for $X_t$) and the time variable $t$ and the remaining term of an \proglang{R} expression will be interpreted as parameter as will explained in Section \ref{sec:diff}.
+We are now able to give an overview of the mian slots of the most important class of the \pkg{yuima} package.
 
 The \code{yuima.model} class contains information about the stochastic differential equation of interest. The constructor function \code{setModel} is
 used to give a mathematical description of the stochastic differential equation. 
@@ -284,9 +293,9 @@
 \item \code{drift} is an \proglang{R} vector of expressions which contains the drift specification;
 \item \code{diffusion} is itself a list of 1 slot which describes the diffusion
   coefficient matrix relative to first noise;
-\item \code{hurst} is the Hurst index of the fractional Brownian motion, by default \code{0.5}  meaning a standard Brownian motion. \textcolor{blue}{More details will be given in Section \ref{sec:fgn}};
+\item \code{hurst} is the Hurst index of the fractional Brownian motion, by default \code{0.5}  meaning a standard Brownian motion. More details will be given in Section \ref{sec:fgn};
 \item \code{parameter},  which is a short name for ``parameters'',  
-  is a list with the following entries \textcolor{blue}{(explained details in Section \ref{sec:par})}:
+  is a list with the following entries (explained details in Section \ref{sec:par}):
 \begin{itemize}
 \item \code{all} contains the names of all the parameters found 
    in the diffusion and drift coefficient;
@@ -294,19 +303,19 @@
 \item \code{diffusion} contains the parameters belonging to the diffusion coefficient;
 \item \code{drift} contains the parameters belonging to the drift coefficient;
 \item \code{jump} contains the parameters belonging to the  coefficient of the L\'evy noise;
-\item \code{measure} contains the parameters \textcolor{red}{describing the L\'evy} measure (\textcolor{blue}{(explained details in Section \ref{sec:jump})};
+\item \code{measure} contains the parameters describing the L\'evy measure (explained details in Section \ref{sec:jump});
 \end{itemize}
-\item \code{measure} specifies the measure of the L\'evy noise (\textcolor{blue}{(see Section \ref{sec:jump})};
-\item \code{measure.type} a switch to specify how the L\'evy measure is described (\textcolor{blue}{(see Section \ref{sec:jump})};
+\item \code{measure} specifies the measure of the L\'evy noise (see Section \ref{sec:jump});
+\item \code{measure.type} a switch to specify how the L\'evy measure is described (see Section \ref{sec:jump});
 \item \code{state.variable} and \code{time.variable}, by default,
-  are assumed to be \code{x} and \code{t} but the user can freely choose them \textcolor{blue}{and they matter the right hand-side of the equation of the sde}.
-  The \code{yuima.model} class assumes that the user either \textcolor{red}{uses} default
+  are assumed to be \code{x} and \code{t} but the user can freely choose them and they matter the right hand-side of the equation of the sde.
+  The \code{yuima.model} class assumes that the user either uses default
   names for \code{state.variable} and \code{time.variable} variables or specify his own names. All
   the rest of the symbols are considered parameters and distributed accordingly
-  in the \code{parameter} slot. \textcolor{blue}{Example of use will be given in Section \ref{sec:diff};}
-\item \code{jump.variable} the name of the variable used in the description of the L\'evy component (\textcolor{blue}{(see Section \ref{sec:jump})};
+  in the \code{parameter} slot. Example of use will be given in Section \ref{sec:diff};
+\item \code{jump.variable} the name of the variable used in the description of the L\'evy component (see Section \ref{sec:jump});
 \item \code{solve.variable} contains a vector of variable names, each element corresponds to the
-   name of the solution variable (left-hand-side) of each equation in the model, in the corresponding order. \textcolor{blue}{An example of use can be found in Section \ref{sec:multi}.}
+   name of the solution variable (left-hand-side) of each equation in the model, in the corresponding order. An example of use can be found in Section \ref{sec:multi}.
 \item \code{noise.number} indicates the number of sources of noise.
 \item \code{xinit} initial value of the stochastic differential equation;
 \item \code{equation.number} represents the number of equations, i.e., the number of one dimensional
@@ -318,29 +327,29 @@
 As seen in the above, the parameter space is accurately described internally in a \code{yuima} object because in inference for stochastic differential equations, estimators of different parameters have different properties. Usually, the rate of convergence for estimators in the diffusion coefficient are similar to the ones in the i.i.d. sampling while estimators of parameters in the drift coefficient are slower or, in some cases, not even consistent. The \pkg{yuima} always tries to implement the best statistical inference for the given model under the observed sampling scheme.
 
 \section{Model Specification}\label{sec3}
-In order to show \textcolor{red}{how general the approach is} in the \pkg{yuima} package we present some examples. \textcolor{blue}{Throughout this section we assume that all the stochastic differential equations exists while in Section \ref{sec5} we will give precise regularity conditions needed to have a properly defined statistical model.}
+In order to show how general the approach is in the \pkg{yuima} package we present some examples. Throughout this section we assume that all the stochastic differential equations exists while in Section \ref{sec5} we will give precise regularity conditions needed to have a properly defined statistical model.
 
 \subsection{One Dimensional Diffusion Processes}\label{sec:diff}
 Assume that we want to describe the following stochastic differential equation
 $$\de X_t = -3 X_t \de t + \frac{1}{1+X_t^2}\de W_t.$$
-\textcolor{blue}{In the above $a(x) = -3 x$ and $b(x) = \frac{1}{1+x^2}$ according to the notaion of previous section and $W_t$ is a standard Wiener process. }
-This \textcolor{blue}{can be described} in \pkg{yuima} \textcolor{red}{by} specifying the drift and diffusion coefficients as plain 
-\textcolor{blue}{\proglang{R} expressions passed as strings}
+In the above $a(x) = -3 x$ and $b(x) = \frac{1}{1+x^2}$ according to the notaion of previous section and $W_t$ is a standard Wiener process.
+This can be described in \pkg{yuima} by specifying the drift and diffusion coefficients as plain
+\proglang{R} expressions passed as strings
 <<print=FALSE,echo=FALSE,results=hide>>=
 library(yuima)
 @ 
 <<echo=TRUE, print=FALSE,results=hide>>=
 mod1 <- setModel(drift = "-3*x", diffusion = "1/(1+x^2)")
 @ 
-\textcolor{blue}{By default, \pkg{yuima} assumes that the state variable is \code{x} and the time variable is \code{t} and the solve variable is again \code{x}. Notice that the left hand-side of the equation is implicit, this is why \code{yuima.model} has the slot \code{solve.variable}.
+By default, \pkg{yuima} assumes that the state variable is \code{x} and the time variable is \code{t} and the solve variable is again \code{x}. Notice that the left hand-side of the equation is implicit, this is why \code{yuima.model} has the slot \code{solve.variable.
 The user should not we worried about the warning raised by \pkg{yuima} at this stage, as this is just to inform the user about the implicit assumption on the solution variable.}
 At this point, the package fills the proper slots of the \code{yuima} object
 <<>>=
 str(mod1)
 @
 
-From the above, it is possible to see that the jump coefficient is void and the Hurst parameter is set to 0.5, \textcolor{blue}{because this is a model where the driving process is the standard Brownian motion, i.e. a fractional Brownian motion if Hurst index $H=\frac12$.}
-Now, with \code{mod1} in hands, it is very easy to simulate a trajectory by  \textcolor{blue}{Euler-Maruyama scheme} of the process as follows
+From the above, it is possible to see that the jump coefficient is void and the Hurst parameter is set to 0.5, because this is a model where the driving process is the standard Brownian motion, i.e. a fractional Brownian motion if Hurst index $H=\frac12$.
+Now, with \code{mod1} in hands, it is very easy to simulate a trajectory by  Euler-Maruyama scheme of the process as follows
 <<echo=TRUE, print=FALSE,fig=TRUE,width=9,height=4,results=hide>>=
 set.seed(123)
 X <- simulate(mod1)
@@ -352,7 +361,7 @@
 <<>>=
 str(X,vec.len=2)
 @
-\textcolor{blue}{More details on how to change the default sampling scheme for the \code{simulate} method and how to perform subsampling will be given in Section \ref{sec:simul}.}
+More details on how to change the default sampling scheme for the \code{simulate} method and how to perform subsampling will be given in Section \ref{sec:simul}.
 
 
 \subsection{User Specified State and Time Variables: NEW SECTION}
@@ -371,18 +380,18 @@
 Once again, the user may use the \code{simulate} method to perform simulation.
 
 \subsection{Specification of Parametric Models}\label{sec:par}
-\textcolor{blue}{Assume now that we want to specify a parametric model like this}
+Assume now that we want to specify a parametric model like this
 $$\de X_t = -\theta X_t \de t + \frac{1}{1+X_t^\gamma}\de W_t$$
-\textcolor{blue}{where $a(x,\theta) = -\theta x$ and $b(x,\gamma) = 1/(1+x^\gamma)$.}
+where $a(x,\theta) = -\theta x$ and $b(x,\gamma) = 1/(1+x^\gamma)$.
 Then, \pkg{yuima} attempts to distinguish the parameters' names from the ones of the state and time variables
 <<echo=TRUE, print=FALSE,results=hide>>=
 mod2 <- setModel(drift = "-theta*x", diffusion = "1/(1+x^gamma)")
 @
-\textcolor{blue}{so, in this case, \code{theta} and \code{gamma}, which are different form \code{x} and \code{t}, are assumed to be parameters. Notice that in the above notation $\theta$ and $\gamma$ are generic names for the components of a parameters' vector $\theta$ in the notation of Section \ref{sec:model}.}
+so, in this case, \code{theta} and \code{gamma}, which are different form \code{x} and \code{t}, are assumed to be parameters. Notice that in the above notation $\theta$ and $\gamma$ are generic names for the components of a parameters' vector $\theta$ in the notation of Section \ref{sec:model}.
 <<>>=
 str(mod2)
 @
-In order to simulate the parametric model it is necessary to specify the values of the \textcolor{blue}{parameters $\theta$ and $\gamma$ as shown in the next code chunk}
+In order to simulate the parametric model it is necessary to specify the values of the parameters $\theta$ and $\gamma$ as shown in the next code chunk
 <<echo=TRUE, print=FALSE,fig=TRUE,height=4,results=hide>>=
 set.seed(123)
 X <- simulate(mod2,true.param=list(theta=1,gamma=3))
@@ -390,28 +399,28 @@
 @
 
 \subsection{Multidimensional Processes}\label{sec:multi}
-\textcolor{blue}{Next is an example of a system of two stochastic differential equations for the couple $(X_{t,1}, X_{t,2})$ driven by three independent Brownian motions $(W_{t,1}, W_{t,2}, W_{t,3})$}
+Next is an example of a system of two stochastic differential equations for the couple $(X_{t,1}, X_{t,2})$ driven by three independent Brownian motions $(W_{t,1}, W_{t,2}, W_{t,3})$
 $$
 \begin{aligned}
 \de X_{1,t} &= -3 X_{1,t} \de t + \de W_{1,t} + X_{2,t} \de W_{3,t}\\
 \de X_{2,t} &= -(X_{1,t} + 2 X_{2,t}) \de t + X_{1,t} \de W_{1,t} + 3 \de W_{2,t}
 \end{aligned}
 $$
-but this has to be organized into matrix form \textcolor{red}{with a vector of drift expressions and a diffusion matrix}
+but this has to be organized into matrix form with a vector of drift expressions and a diffusion matrix
 $$
 \left(\begin{array}{c}\de X_{1,t} \\\de X_{2,t}\end{array}\right)=
 \left(\begin{array}{c} -3 X_{1,t} \\  -X_{1,t} - 2X_{2,t}\end{array}\right)\de t +
 \left(\begin{array}{ccc}1 & 0 & X_{2,t} \\X_{1,t} & 3 & 0\end{array}\right)
 \left(\begin{array}{c}\de W_{t,1} \\ \de W_{t,2} \\ \de W_{t,3}\end{array}\right)
 $$
-\textcolor{blue}{For this system it now necessary to instruct \pkg{yuima} about the state variable on bot the left-hand side of the equation and the right-hand side of the equation, i.e. the \code{solve.variable}.}
+For this system it now necessary to instruct \pkg{yuima} about the state variable on bot the left-hand side of the equation and the right-hand side of the equation, i.e. the \code{solve.variable}.
 <<echo=TRUE, print=FALSE,results=hide>>=
 sol <- c("x1","x2") # variable for numerical solution
 a <- c("-3*x1","-x1-2*x2")   # drift vector 
 b <- matrix(c("1","x1","0","3","x2","0"),2,3)  #  diffusion matrix
 mod3 <- setModel(drift = a, diffusion = b, solve.variable = sol)
 @
-\textcolor{blue}{Looking at the structure of the \code{noise.number} slot in \code{mod3}, one can see that this is now set to 3 which is taken as the number of columns of the diffusion matrix.}
+Looking at the structure of the \code{noise.number} slot in \code{mod3}, one can see that this is now set to 3 which is taken as the number of columns of the diffusion matrix.
 Again, this model can be easily simulated
 <<echo=TRUE, print=FALSE,fig=TRUE,width=9,height=4,results=hide>>=
 set.seed(123)
@@ -482,7 +491,7 @@
     solve.variable = c("x1", "x2", "x3"))
 str(sabr.mod at parameter)
 @
-\textcolor{blue}{The functions \code{f1}, \code{f2} and \code{f3} are defined in a way that, when the trajectory of the processes crosso zero from above, the trajectory is stopped ad zero. Notice that in this way the only visible parameter for \pkg{yuima} is \code{mu} as \code{rho} and \code{sig} are inside the bodies of the functions \code{f2} and \code{f3}. If we want to instruct \pkg{yuima} about these parameters, they should appear explicitly as arguments of the functions as explained by this \proglang{R} code}
+The functions \code{f1}, \code{f2} and \code{f3} are defined in a way that, when the trajectory of the processes crosso zero from above, the trajectory is stopped ad zero. Notice that in this way the only visible parameter for \pkg{yuima} is \code{mu} as \code{rho} and \code{sig} are inside the bodies of the functions \code{f2} and \code{f3}. If we want to instruct \pkg{yuima} about these parameters, they should appear explicitly as arguments of the functions as explained by this \proglang{R} code
 <<echo=TRUE, print=FALSE,results=hide>>=
  f2 <- function(t, x1, x2, x3, rho, sig) {
      ret <- 0
@@ -535,7 +544,7 @@
 <<>>=
 str(mod4A)
 @
-The user can choose \textcolor{red}{between  two} simulation schemes, namely the Cholesky method and \citet{WoodChan} method. This is done via the argument \code{methodfGn} in the \code{simulate} method. The default simulation scheme is Wood and Chan and it is chosen by setting \code{methodfGn="WoodChan"}, the other simply by setting \code{methodfGn} to \code{Cholesky}.
+The user can choose between  two simulation schemes, namely the Cholesky method and \citet{WoodChan} method. This is done via the argument \code{methodfGn} in the \code{simulate} method. The default simulation scheme is Wood and Chan and it is chosen by setting \code{methodfGn="WoodChan"}, the other simply by setting \code{methodfGn} to \code{Cholesky}.
 
 \subsection{L\'evy Processes}\label{sec:jump}
 Jump processes can be specified in different ways in mathematics and hence in \pkg{yuima} package. 
@@ -582,8 +591,8 @@
 
 \section{Simulation, Sampling and Subsampling}\label{sec:simul}
 The \code{simulate} function simulates \code{yuima} models according to Euler-Maruyama scheme in the presence of non-fractional diffusion noise and L\'evy jumps and uses the Cholesky or the Wood and Chan methods for the fractional Gaussian noise.
-The \code{simulate} function accepts several arguments including the description of the sampling structure, which is an object of type \code{yuima.sampling}. The \code{setSampling} \textcolor{red}{allows} for the specification of different sampling parameters including random sampling. Further, the \code{subsampling} \textcolor{red}{allows us} to subsample a trajectory of a simulated stochastic differential equation or a given time series in the \code{yuima.data} slot of a \code{yuima} object.
-Sampling and subsampling can be specified jointly as arguments to the \code{simulate} function. This is convenient if one wants to simulate data at very high frequency but then return only low frequency data for inference or other applications. \textcolor{red}{In what follows we explain how to specify  arguments of these \pkg{yuima} functions.   Complete details can be found in  the man pages of the \pkg{yuima} package.}
+The \code{simulate} function accepts several arguments including the description of the sampling structure, which is an object of type \code{yuima.sampling}. The \code{setSampling} allows for the specification of different sampling parameters including random sampling. Further, the \code{subsampling} allows us to subsample a trajectory of a simulated stochastic differential equation or a given time series in the \code{yuima.data} slot of a \code{yuima} object.
+Sampling and subsampling can be specified jointly as arguments to the \code{simulate} function. This is convenient if one wants to simulate data at very high frequency but then return only low frequency data for inference or other applications. In what follows we explain how to specify  arguments of these \pkg{yuima} functions.   Complete details can be found in  the man pages of the \pkg{yuima} package.
 
 Assume that we want to simulate this model
 $$
@@ -607,7 +616,7 @@
 <<>>=
 str(samp)
 @
[TRUNCATED]

To get the complete diff run:
    svnlook diff /svnroot/yuima -r 232


More information about the Yuima-commits mailing list