AnaSimX(Sim.DiffProc)
AnaSimX()所属R语言包:Sim.DiffProc
Simulation M-Samples of Random Variable X(v[t]) For A Simulated Diffusion Process
仿真M-的样品随机变量X(V [T])为模拟扩散过程
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Simulation M-samples of the random variable X(v(t)) by a simulated diffusion process with a fixed the time v , v = k * Dt with k integer, 1 <= k <= N .
模拟的M-样品的随机变量X(五(t))的由一个模拟的扩散过程与一个固定的时间v, v = k * Dt与k integer, 1 <= k <= N 。
用法----------Usage----------
AnaSimX(N, M, t0, Dt, T = 1, X0, v, drift, diff, Output = FALSE,
Methods = c("Euler", "Milstein", "MilsteinS", "Ito-Taylor",
"Heun", "RK3"), ...)
参数----------Arguments----------
参数:N
size of the diffusion process.
的扩散过程的大小。
参数:M
size of the random variable.
随机变量的大小。
参数:t0
initial time.
初始时间。
参数:Dt
time step of the simulation (discretization).
时间步长的仿真(discretization)。
参数:T
final time.
最后的时间。
参数:X0
initial value of the process at time t0.
初始值的过程中,在时间t0。
参数:v
moment (time) between t0 and T , v = k * Dt with k integer, 1 <= k <= N .
时刻(时间)之间t0和T, v = k * Dtk integer, 1 <= k <= N 。
参数:drift
drift coefficient: an expression of two variables t and x.
漂移:表达两个变量t和x。
参数:diff
diffusion coefficient: an expression of two variables t and x.
扩散系数:表达两个变量t和x。
参数:Output
if Output = TRUE write a Output to an Excel (.csv).
如果Output = TRUE写的Output到Excel(CSV)。
参数:Methods
method of simulation ,see details snssde.
模拟的方法,详情请参阅snssde。
参数:...
Details
详细信息----------Details----------
The stochastic differential equation of is :
随机微分方程的是:
with a(t,X(t)) :drift coefficient and b(t,X(t)) :diffusion coefficient, W(t) is Wiener process.
a(t,X(t)) :drift coefficient和b(t,X(t)) :diffusion coefficient,W(t)是维纳过程。
We take interest in the random variable X(v), is defined by :
我们兴趣的随机变量X(v),被定义为:
with v is the time between t0 and T , v = k * Dt with k integer, 1 <= k <= N .
v是之间的时间t0和T, v = k * Dtk integer, 1 <= k <= N 。
值----------Value----------
Random variable "X(v(t))".
随机变量“X(V(T))”。
注意----------Note----------
Time of Calculating
计算时间
The Ornstein-Uhlenbeck Process (example) drift <- expression(-5*x) diff <- expression(1)
Ornstein-Uhlenbeck过程(例如)漂移< - 表达(-5 * x)的差异 - 式(1)
system.time(AnaSimX(N=1000,M=30,t0=0,Dt=0.001,T=1,X0=0, v=0.5,drift,diff,Output=FALSE))
system.time(AnaSimX(N = 1000,M = 30,T0 = 0,DT = 0.001,T = 1,X0 = 0,V = 0.5,漂移,比较,输出= FALSE))
utilisateur systeme ecoule
utilisateur SYSTEME ecoule
1.88 0.56 2.59
1.88 0.56 2.59
system.time(AnaSimX(N=1000,M=30,t0=0,Dt=0.001,T=1,X0=0, v=0.5,drift,diff,Output=FALSE,Methods="RK3"))
system.time(AnaSimX(N = 1000,M = 30,T0 = 0,DT = 0.001,T = 1,X0 = 0,V = 0.5,漂移,比较,输出= FALSE,方法=“RK3”))
utilisateur systeme ecoule
utilisateur SYSTEME ecoule
8.64 0.72 9.24
8.64 0.72 9.24
(作者)----------Author(s)----------
Boukhetala Kamal, Guidoum Arsalane.
参考文献----------References----------
K.Boukhetala, Kernel density of the exit time in a simulated diffusion, les Annales Maghrebines De L ingenieur, Vol , 12, N Hors Serie. Novembre 1998, Tome II, pp 587-589.
参见----------See Also----------
AnaSimFPT Simulation The First Passage Time FPT For A Simulated Diffusion Process, tho_M1 Simulation The FPT For Attractive Model(S = 1,Sigma), tho_M1 Simulation The FPT For Attractive Model(S >= 2,Sigma), tho_02diff Simulation FPT For Attractive Model for 2-Diffusion Processes.
AnaSimFPT模拟扩散过程的模拟,首次穿越时间FPT tho_M1模拟FPT有吸引力的模型(S = 1,Sigma公司),tho_M1有吸引力的模型模拟FPT(S> = 2,Sigma公司),tho_02diff模拟FPT 2 - 扩散过程的模型有吸引力的。
实例----------Examples----------
## Example 1: BM[例1:BM]
## v = k * Dt with k integer , 1 <= k <= N .[#=的k * Dt的具有k整数,1 <= K <= N。]
## k = 500 nombre for discretization[#K = 500农布雷的离散]
## Dt = 0.001 ===> v = 500 * 0.001 = 0.5[#DT = 0.001 ===> V = 500 * 0.001 = 0.5]
drift <- expression(0)
diff <- expression(1)
AnaSimX(N=1000,M=30,t0=0,Dt=0.001,T=1,X0=0,v=0.5,drift,diff,Output=FALSE,Methods="Euler")
summary(X)
hist(X)
v=0.5
plot(density(X,kernel ="gaussian"),col="red")
x <- seq(min(X),max(X),length=1000)
curve(dnorm(x,0,v), col = 3, lwd = 2, add = TRUE,
panel.first=grid(col="gray"))
## Example 2: BMG or BS[例2:BMG或BS]
## v = k * Dt with k integer , 1 <= k <= N .[#=的k * Dt的具有k整数,1 <= K <= N。]
## k = 800 nombre for discretization[#K = 800农布雷的离散]
## Dt = 0.001 ===> v = 800 * 0.001 = 0.8[#DT = 0.001 ===> V = 800 * 0.001 = 0.8]
drift <- expression(2*x)
diff <- expression(x)
AnaSimX(N=1000,M=30,t0=0,Dt=0.001,T=1,X0=1,v=0.8,drift,diff,Output=FALSE,Methods="Euler")
summary(X)
hist(X)
plot(density(X,kernel ="gaussian"),col="red")
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|