dcSim(sde)
dcSim()所属R语言包:sde
Pedersen's simulated transition density
Pedersen的模拟过渡密度
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Simulated transition density X(t) | X(t_0) = x_0X(t) | X(t0) = x0 of a diffusion process based on
模拟过渡密度X(t) | X(t_0) = x_0X(t)的| X(t0)的= X0的扩散工艺的基础上
用法----------Usage----------
dcSim(x0, x, t, d, s, theta, M=10000, N=10, log=FALSE)
参数----------Arguments----------
参数:x0
the value of the process at time 0.
的值的过程在时间0。
参数:x
value in which to evaluate the conditional density.
值,在其评价的条件密度。
参数:t
lag or time.
滞后时间。
参数:theta
parameter of the process; see details.
参数的过程中,看到的细节。
参数:log
logical; if TRUE, probabilities p are given as log(p).
逻辑;如果是TRUE,概率p是log(p)。
参数:d
drift coefficient as a function; see details.
漂移系数的函数,查看详细信息。
参数:s
diffusion coefficient as a function; see details.
扩散系数为一个函数;见详情。
参数:N
number of subintervals; see details.
子区间的数量,查看详细信息。
参数:M
number of Monte Carlo simulations, which should be an even number; see details.
蒙特卡罗模拟的数量,这应该是一个偶数,看细节。
Details
详细信息----------Details----------
This function returns the value of the conditional density of X(t) | X(0) = x0 at point x.
这个函数返回值的条件密度X(t) | X(0) = x0在点x。
The functions d and s, must be functions of t, x, and theta.
的功能d和s,必须t,x和theta的功能。
值----------Value----------
<table summary="R valueblock"> <tr valign="top"><td>x</td> <td> a numeric vector</td></tr> </table>
<table summary="R valueblock"> <tr valign="top"> <TD>x </ TD> <td>一个数值向量</ TD> </ TR> </ TABLE>
(作者)----------Author(s)----------
Stefano Maria Iacus
参考文献----------References----------
Pedersen, A. R. (1995) A new approach to maximum likelihood estimation for stochastic differential equations based on discrete observations, Scand. J. Statist., 22, 55-71.
实例----------Examples----------
## Not run: [#不运行:]
d1 <- function(t,x,theta) theta[1]*(theta[2]-x)
s1 <- function(t,x,theta) theta[3]*sqrt(x)
from <- 0.08
x <- seq(0,0.2, length=100)
sle10 <- NULL
sle2 <- NULL
sle5 <- NULL
true <- NULL
set.seed(123)
for(to in x){
sle2 <- c(sle2, dcSim(from, to, 0.5, d1, s1,
theta=c(2,0.02,0.15), M=50000,N=2))
sle5 <- c(sle5, dcSim(from, to, 0.5, d1, s1,
theta=c(2,0.02,0.15), M=50000,N=5))
sle10 <- c(sle10, dcSim(from, to, 0.5, d1, s1,
theta=c(2,0.02,0.15), M=50000,N=10))
true <- c(true, dcCIR(to, 0.5, from, c(2*0.02,2,0.15)))
}
par(mar=c(5,5,1,1))
plot(x, true, type="l", ylab="conditional density")
lines(x, sle2, lty=4)
lines(x, sle5, lty=2)
lines(x, sle10, lty=3)
legend(0.15,20, legend=c("exact","N=2", "N=5", "N=10"),
lty=c(1,2,4,3))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|