gillespie(smfsb)
gillespie()所属R语言包:smfsb
Simulate a sample path from a stochastic kinetic model described by a stochastic Petri net
从一个随机Petri网的随机动力学模型所描述的,模拟的样本路径
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function simulates a single realisation from a discrete stochastic kinetic model described by a stochastic Petri net (SPN).
此功能模拟的是单实现从离散随机动力学模型的随机Petri网(SPN)。
用法----------Usage----------
gillespie(N, n, ...)
参数----------Arguments----------
参数:N
An R list with named components representing a stochastic Petri net (SPN). Should contain N$M, a vector representing the initial marking of the net, N$Pre, a matrix representing the LHS stoichiometries, N$Post, a matrix representing the RHS stoichiometries, and N$h, a function representing the rates of the reaction processes. N$h should have first argument x, a vector representing the current state of the system, and second argument t, a scalar representing the current simulation time (in the typical time-homogeneous case, N$h will ignore this argument). N$h may posses additional arguments, representing reaction rates, for example.
R列表代表一个随机Petri网(SPN)的命名的组件。应包含N$M,一个向量,表示净值的初始标识,N$Pre,代表了LHS化学计量矩阵,N$Post,矩阵的RHS化学计量,和N$h的,代表的反应过程的速率的函数。 N$h应该有第一个参数x,一个向量,表示该系统的当前状态,和第二个参数t,一个标量,表示当前的仿真时间(在典型的时间均匀的情况下, N$h将忽略此参数)。 N$h可能拥有额外的参数,代表反应速率,例如。
参数:n
An integer representing the number of events to simulate, excluding the initial state, N$M.
一个整数,代表的事件的数量来模拟,不含初始状态下,N$M。
参数:...
Additional arguments (such as reactions rates) will be passed into the function N$h.
其他参数(如反应发生率)会被传递到函数N$h。
值----------Value----------
A list with first component t, a vector of length n containing event times and second component x, a matrix with n+1 rows containing the state of the system. The ith row of x contains the state of the system prior to the ith event.
第一组分的列表与t,一个向量的长度n包含事件时间和第二成分x,n+1行包含该系统的状态的矩阵。 i日行x包含系统状态的之前i次事件的。
参见----------See Also----------
simpleEuler, rdiff,
simpleEuler,rdiff,
实例----------Examples----------
# load the LV model[加载LV模型]
data(spnModels)
# simulate a realisation of the process and plot it[模拟的过程,并画出它的实现]
out = gillespie(LV,10000)
op = par(mfrow=c(2,2))
plot(stepfun(out$t,out$x[,1]),pch="")
plot(stepfun(out$t,out$x[,2]),pch="")
plot(out$x,type="l")
# use the "discretise" function to map it to an R "ts" object[使用“discretise”功能将它映射到一个R“TS”对象]
plot(discretise(out,dt=0.01),plot.type="single",lty=c(1,2))
par(op)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|