[Yuima-commits] r22 - in pkg/yuima: R man
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 24 16:34:03 CET 2009
Author: iacus
Date: 2009-11-24 16:34:03 +0100 (Tue, 24 Nov 2009)
New Revision: 22
Modified:
pkg/yuima/R/simulate.R
pkg/yuima/man/simulate.Rd
Log:
change the interface to simulate to match package stats
Modified: pkg/yuima/R/simulate.R
===================================================================
--- pkg/yuima/R/simulate.R 2009-11-24 15:19:25 UTC (rev 21)
+++ pkg/yuima/R/simulate.R 2009-11-24 15:34:03 UTC (rev 22)
@@ -1,17 +1,19 @@
##:: function simulate
##:: solves SDE and returns result
setGeneric("simulate",
- function(yuima, xinit, true.parameter, space.discretized=FALSE, increment.W=NULL, increment.L=NULL)
+ function(object, nsim, seed, xinit, true.parameter, space.discretized=FALSE, increment.W=NULL, increment.L=NULL)
standardGeneric("simulate")
)
setMethod("simulate", "yuima",
- function(yuima, xinit, true.parameter, space.discretized=FALSE, increment.W=NULL, increment.L=NULL){
+ function(object, nsim=1, seed=NULL, xinit, true.parameter, space.discretized=FALSE, increment.W=NULL, increment.L=NULL){
##:: errors checks
##:1: error on yuima model
+ yuima <- object
+
if(missing(yuima)){
cat("\nyuima object is missing.\n")
return(NULL)
Modified: pkg/yuima/man/simulate.Rd
===================================================================
--- pkg/yuima/man/simulate.Rd 2009-11-24 15:19:25 UTC (rev 21)
+++ pkg/yuima/man/simulate.Rd 2009-11-24 15:34:03 UTC (rev 22)
@@ -3,16 +3,18 @@
\title{Simulator function for multi-dimensional stochastic processes}
\description{Simulate multi-dimensional stochastic processes.}
\usage{
-simulate(yuima, xinit, true.parameter, space.discretized, increment.W, increment.L)
+simulate(yuima, nsim, seed, xinit, true.parameter, space.discretized, increment.W, increment.L)
}
\arguments{
- \item{yuima}{an \code{yuima} object.}
+ \item{object}{an \code{yuima} object.}
\item{xinit}{initial value vector of state variables.}
\item{true.parameter}{initial value vector of parameters.}
\item{space.discretized}{flag to switch to space-discretized Euler
Maruyama method.}
\item{increment.W}{to specify Wiener increment for each time tics in advance.}
\item{increment.L}{to specify Levy increment for each time tics in advance.}
+ \item{nsim}{Not used yet. Included only to match the standard genenirc in package \code{stats}.}
+ \item{seed}{Not used yet. Included only to match the standard genenirc in package \code{stats}.}
}
\details{
\code{simulate} is a function to solve SDE using the Euler-Maruyama
More information about the Yuima-commits
mailing list