Last data update: 2014.03.03

R: Diffusion processes
diffusionR Documentation

Diffusion processes

Description

diffusion creates an object of class “diffusion” from the set of provided values. is.diffusionchecks if its argument is an object of class “diffusion”. print shows an object of class “diffusion”.

Usage

diffusion(text)
is.diffusion(obj)
## S3 method for class 'diffusion'
print(x, ...)

Arguments

text

a character vector of length two, containing the infinitesimal mean and infinitesimal variance of the process

obj

an R object to be tested

x

an object of class “diffusion”

...

additional arguments potentially passed (currently none is considered).

Value

diffusion returns an object of class “diffusion” that defines a family of diffusion processes. It is a two-component list:

mean

character of length 1 with the mathematical expression of the infinitesimal mean of the process;

var

character of length 1 with the mathematical expression of the infinitesimal variance of the process.

is.diffusion returns TRUE or FALSE depending on whether its argument is an object of class “diffusion” or not. print.diffusion shows a brief description of the process reporting the functional form of its infinitesimal mean and variance.

Author(s)

A. Buonocore, M.F. Carfora

Examples

## Creating a "diffusion" object representing a Wiener process 
Wiener <- diffusion(c("mu","sigma2"))

## Creating a "diffusion" object representing 
## an Ornstein-Uhlenbeck process with an injected current

OrnUhlCur <- diffusion(c("-x/theta + mu + i0*exp(-(t-t0)/theta1)","sigma2"))

## testing diffusion objects

is.diffusion(Wiener)
is.diffusion(OrnUhlCur)

Results


R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)

R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.

R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.

Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.

> library(GaDiFPT)
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/GaDiFPT/diffusion.Rd_%03d_medium.png", width=480, height=480)
> ### Name: diffusion
> ### Title: Diffusion processes
> ### Aliases: diffusion is.diffusion print.diffusion
> 
> ### ** Examples
> 
> ## Creating a "diffusion" object representing a Wiener process 
> Wiener <- diffusion(c("mu","sigma2"))
> 
> ## Creating a "diffusion" object representing 
> ## an Ornstein-Uhlenbeck process with an injected current
> 
> OrnUhlCur <- diffusion(c("-x/theta + mu + i0*exp(-(t-t0)/theta1)","sigma2"))
> 
> ## testing diffusion objects
> 
> is.diffusion(Wiener)
[1] TRUE
> is.diffusion(OrnUhlCur)
[1] TRUE
> 
> 
> 
> 
> 
> dev.off()
null device 
          1 
>