# rcCIR: Conditional law of the Cox-Ingersoll-Ross process In sde: Simulation and Inference for Stochastic Differential Equations

## Description

Density, distribution function, quantile function and random generation for the conditional law X(t+D_t) | X(t)=x0 of the Cox-Ingersoll-Ross process.

## Usage

 ```1 2 3 4``` ```dcCIR(x, Dt, x0, theta, log = FALSE) pcCIR(x, Dt, x0, theta, lower.tail = TRUE, log.p = FALSE) qcCIR(p, Dt, x0, theta, lower.tail = TRUE, log.p = FALSE) rcCIR(n=1, Dt, x0, theta) ```

## Arguments

 `x` vector of quantiles. `p` vector of probabilities. `Dt` lag or time. `x0` the value of the process at time `t`; see details. `theta` parameter of the Ornstein-Uhlenbeck process; see details. `n` number of random numbers to generate from the conditional distribution. `log, log.p` logical; if TRUE, probabilities p are given as log(p). `lower.tail` logical; if TRUE (default), probabilities are `P[X <= x]`; otherwise `P[X > x]`.

## Details

This function returns quantities related to the conditional law of the process solution of

dX_t = (theta[1]-theta[2]*Xt)*dt + theta[3]*sqrt(X_t)*dWt.

Constraints: 2*theta[1]> theta[3]^2, all theta positive.

## Value

 `x` a numeric vector

## Author(s)

Stefano Maria Iacus

## References

Cox, J.C., Ingersoll, J.E., Ross, S.A. (1985) A theory of the term structure of interest rates, Econometrica, 53, 385-408.

`rsCIR`

## Examples

 `1` ```rcCIR(n=1, Dt=0.1, x0=1, theta=c(6,2,2)) ```

### Example output

```Loading required package: MASS

Attaching package: 'fda'

The following object is masked from 'package:graphics':

matplot

Attaching package: 'zoo'

The following objects are masked from 'package:base':

as.Date, as.Date.numeric

sde 2.0.15
Companion package to the book
'Simulation and Inference for Stochastic Differential Equations With R Examples'
Iacus, Springer NY, (2008)
To check the errata corrige of the book, type vignette("sde.errata")
[1] 2.825196
```

sde documentation built on May 31, 2017, 3:58 a.m.