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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Sep 23 10:21:16 CEST 2014


Author: iacus
Date: 2014-09-23 10:21:16 +0200 (Tue, 23 Sep 2014)
New Revision: 329

Added:
   pkg/yuima/man/rconst.Rd
   pkg/yuima/man/setPoisson.Rd
   pkg/yuima/man/yuima.poisson-class.Rd
Log:
poisson class

Added: pkg/yuima/man/rconst.Rd
===================================================================
--- pkg/yuima/man/rconst.Rd	                        (rev 0)
+++ pkg/yuima/man/rconst.Rd	2014-09-23 08:21:16 UTC (rev 329)
@@ -0,0 +1,32 @@
+\name{rconst}
+\alias{rconst}
+\alias{dconst}
+\title{
+Fictitious rng for the constant random variable used to generate and describe
+Poisson jumps.
+}
+\description{
+Fictitious rng for the constant random variable used to generate and describe
+Poisson jumps.
+}
+\usage{
+rconst(n, k = 1)
+dconst(x, k = 1)
+}
+\arguments{
+  \item{n}{number of replications}
+  \item{k}{the size of the jump}
+  \item{x}{the fictitious argument}
+}
+\value{
+returns a numeric vector
+}
+\author{The YUIMA Project Team}
+\examples{
+dconst(1,1)
+dconst(2,1)
+dconst(2,2)
+
+rconst(10,3)
+}
+\keyword{ts}
\ No newline at end of file

Added: pkg/yuima/man/setPoisson.Rd
===================================================================
--- pkg/yuima/man/setPoisson.Rd	                        (rev 0)
+++ pkg/yuima/man/setPoisson.Rd	2014-09-23 08:21:16 UTC (rev 329)
@@ -0,0 +1,85 @@
+\name{setPoisson}
+\alias{setPoisson}
+
+\title{
+  Basic constructor for Compound Poisson processes
+}
+
+\description{
+  'setPoisson' construct a Compound Poisson model specification for a process of the form:
+
+  \code{Mt = m0+sum_{i=0}^Nt c*Y_{tau_i},  M0=m0}
+
+  where Nt is a homogeneous or time-inhomogeneous Poisson process, tau_i is the
+  sequence of random times of Nt and Y is a sequence of i.i.d. random jumps.
+}
+
+\usage{
+setPoisson(intensity = 1, df = NULL, scale = 1, ...)
+}
+
+\arguments{
+  \item{intensity}{either and expression or a numerical value representing the intensity function of the Poisson process Nt.}
+  \item{df}{is the density of jump random variables Y.}
+  \item{scale}{this is the scaling factor \code{c}.}
+  \item{...}{passed to \code{\link{setModel}}}
+ }
+
+\details{
+
+An object of \code{\link{yuima.model-class}} where the \code{model} slot is of class \code{yuima.poisson-class}.
+
+}
+
+\value{
+  \item{model}{an object of  \code{\link{yuima.model-class}}.}
+}
+
+\author{The YUIMA Project Team}
+
+\examples{
+Terminal <- 10
+samp <- setSampling(T=Terminal,n=1000)
+
+# Ex 1. (Simple homogeneous Poisson process)
+mod1 <- setPoisson(intensity="lambda", df=list("dconst(z,1)"))
+set.seed(123)
+y1 <- simulate(mod1, true.par=list(lambda=1),sampling=samp)
+plot(y1)
+
+# scaling the jumps
+mod2 <- setPoisson(intensity="lambda", df=list("dconst(z,1)"),scale=5)
+set.seed(123)
+y2 <- simulate(mod2, true.par=list(lambda=1),sampling=samp)
+plot(y2)
+
+# scaling the jumps through the constant distribution
+mod3 <- setPoisson(intensity="lambda", df=list("dconst(z,5)"))
+set.seed(123)
+y3 <- simulate(mod3, true.par=list(lambda=1),sampling=samp)
+plot(y3)
+
+# Ex 2. (Time inhomogeneous Poisson process)
+mod4 <- setPoisson(intensity="beta*(1+sin(lambda*t))", df=list("dconst(z,1)"))
+set.seed(123)
+lambda <- 3
+beta <- 5
+y4 <- simulate(mod4, true.par=list(lambda=lambda,beta=beta),sampling=samp)
+par(mfrow=c(2,1))
+par(mar=c(3,3,1,1))
+plot(y4)
+f <- function(t) beta*(1+sin(lambda*t))
+curve(f, 0, Terminal, col="red")
+
+# Ex 2. (Time inhomogeneous Compound Poisson process with Gaussian Jumps)
+mod5 <- setPoisson(intensity="beta*(1+sin(lambda*t))", df=list("dnorm(z,mu,sigma)"))
+set.seed(123)
+y5 <- simulate(mod5, true.par=list(lambda=lambda,beta=beta,mu=0, sigma=2),sampling=samp)
+plot(y5)
+f <- function(t)  beta*(1+sin(lambda*t))
+curve(f, 0, Terminal, col="red")
+
+}
+\keyword{ts}
+
+


Property changes on: pkg/yuima/man/setPoisson.Rd
___________________________________________________________________
Added: svn:executable
   + *

Added: pkg/yuima/man/yuima.poisson-class.Rd
===================================================================
--- pkg/yuima/man/yuima.poisson-class.Rd	                        (rev 0)
+++ pkg/yuima/man/yuima.poisson-class.Rd	2014-09-23 08:21:16 UTC (rev 329)
@@ -0,0 +1,49 @@
+\name{yuima.poisson-class}
+\docType{class}
+\alias{yuima.poisson-class}
+\alias{initialize,yuima.poisson-method}
+
+\title{Class for the mathematical description of Compound Poisson processes}
+\description{
+  The \code{yuima.poisson} 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