[Yuima-commits] r284 - pkg/yuima/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 19 13:39:09 CET 2014


Author: iacus
Date: 2014-03-19 13:39:08 +0100 (Wed, 19 Mar 2014)
New Revision: 284

Modified:
   pkg/yuima/man/CPoint.Rd
   pkg/yuima/man/CarmaRecovNoise.Rd
   pkg/yuima/man/adaBayes.Rd
   pkg/yuima/man/asymptotic_term.Rd
   pkg/yuima/man/cce.Rd
   pkg/yuima/man/limiting.gamma.Rd
   pkg/yuima/man/llag.Rd
   pkg/yuima/man/mmfrac.Rd
   pkg/yuima/man/phi.test.Rd
   pkg/yuima/man/qmle.Rd
   pkg/yuima/man/simulate.Rd
Log:
fixed docs for cran submission

Modified: pkg/yuima/man/CPoint.Rd
===================================================================
--- pkg/yuima/man/CPoint.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/CPoint.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -40,6 +40,7 @@
 }
 \author{The YUIMA Project Team}
 \examples{
+\dontrun{
 diff.matrix <- matrix(c("theta1.1*x1","0*x2","0*x1","theta1.2*x2"), 2, 2)
 
 drift.c <- c("1-x1", "3-x2")
@@ -84,9 +85,11 @@
 
 # first state estimate of parameters using small 
 # portion of data in the tails
-tmp1 <- qmleL(yuima,start=list(theta1.1=0.3,theta1.2=0.5),t=1.5,lower=low, method="L-BFGS-B")
+tmp1 <- qmleL(yuima,start=list(theta1.1=0.3,theta1.2=0.5),t=1.5,
+        lower=low, method="L-BFGS-B")
 tmp1
-tmp2 <- qmleR(yuima,start=list(theta1.1=0.3,theta1.2=0.5), t=8.5,lower=low, method="L-BFGS-B")
+tmp2 <- qmleR(yuima,start=list(theta1.1=0.3,theta1.2=0.5), t=8.5,
+        lower=low, method="L-BFGS-B")
 tmp2
 
 
@@ -97,15 +100,18 @@
 
 # second stage estimation of parameters given first stage
 # change point estimator
-tmp11 <- qmleL(yuima,start=as.list(coef(tmp1)), t=t.est2$tau-0.1,lower=low, method="L-BFGS-B")
+tmp11 <- qmleL(yuima,start=as.list(coef(tmp1)), t=t.est2$tau-0.1,
+ lower=low, method="L-BFGS-B")
 tmp11
 
-tmp21 <- qmleR(yuima,start=as.list(coef(tmp2)), t=t.est2$tau+0.1,lower=low, method="L-BFGS-B")
+tmp21 <- qmleR(yuima,start=as.list(coef(tmp2)), t=t.est2$tau+0.1,
+ lower=low, method="L-BFGS-B")
 tmp21
 
 # second stage estimator of the change point
 CPoint(yuima,param1=coef(tmp11),param2=coef(tmp21))
 
+
 ## One dimensional example: non linear case
 diff.matrix <- matrix("(1+x1^2)^theta1", 1, 1)
 drift.c <- c("x1")
@@ -169,16 +175,19 @@
 
 # second stage estimation of parameters given first stage
 # change point estimator
-tmp11 <- qmleL(yuima,start=as.list(coef(tmp1)), t=t.est2$tau-0.1, lower=low, upper=upp,method="L-BFGS-B")
+tmp11 <- qmleL(yuima,start=as.list(coef(tmp1)), t=t.est2$tau-0.1,
+   lower=low, upper=upp,method="L-BFGS-B")
 tmp11
 
-tmp21 <- qmleR(yuima,start=as.list(coef(tmp2)), t=t.est2$tau+0.1,lower=low, upper=upp,method="L-BFGS-B")
+tmp21 <- qmleR(yuima,start=as.list(coef(tmp2)), t=t.est2$tau+0.1,
+  lower=low, upper=upp,method="L-BFGS-B")
 tmp21
 
 
 # second stage estimator of the change point
 CPoint(yuima,param1=coef(tmp11),param2=coef(tmp21),plot=TRUE)
 }
+}
  
 % Add one or more standard keywords, see file 'KEYWORDS' in the
 % R documentation directory.

Modified: pkg/yuima/man/CarmaRecovNoise.Rd
===================================================================
--- pkg/yuima/man/CarmaRecovNoise.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/CarmaRecovNoise.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -31,6 +31,7 @@
 
 
 \examples{
+\dontrun{
 #Ex.1: Carma(p=3, q=0) process driven by a brownian motion.
 
 mod0<-setCarma(p=3,q=0)
@@ -122,6 +123,7 @@
 # Increments estimated by CarmaRecovNoise
 plot(carmaopt2)
 }
+}
 
 
 % Add one or more standard keywords, see file 'KEYWORDS' in the

Modified: pkg/yuima/man/adaBayes.Rd
===================================================================
--- pkg/yuima/man/adaBayes.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/adaBayes.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -42,7 +42,8 @@
 prior.theta2 <- function(theta1)
   1*(theta1 > 0 & theta1 < 1)
 
-prior <- list(theta2=list(measure.type="code",df="dunif(z,0,1)"), theta1=list(measure.type="code",df="dunif(z,0,1)"))
+prior <- list(theta2=list(measure.type="code",df="dunif(z,0,1)"), 
+theta1=list(measure.type="code",df="dunif(z,0,1)"))
 
 param.init <- list(theta2=0.35,theta1=0.52)
 
@@ -52,7 +53,8 @@
 bayes1 <- adaBayes(yuima, start=param.init, prior=prior, method="nomcmc")
 bayes1 at coef
 
-mle1 <- qmle(yuima, start=param.init, lower=list(theta1=0,theta2=0), upper=list(theta1=1,theta2=1), method="L-BFGS-B")
+mle1 <- qmle(yuima, start=param.init, lower=list(theta1=0,theta2=0), 
+     	upper=list(theta1=1,theta2=1), method="L-BFGS-B")
 mle1 at coef
 }
 \keyword{ts}

Modified: pkg/yuima/man/asymptotic_term.Rd
===================================================================
--- pkg/yuima/man/asymptotic_term.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/asymptotic_term.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -27,8 +27,8 @@
 \examples{
 # to the Black-Scholes economy:
 # dXt^e = Xt^e * dt + e * Xt^e * dWt
-diff.matrix <- matrix( c("x*e"), 1,1)
-model <- setModel(drift = c("x"), diffusion = diff.matrix)
+diff.matrix <- "x*e"
+model <- setModel(drift = "x", diffusion = diff.matrix)
 # call option is evaluated by averating
 # max{ (1/T)*int_0^T Xt^e dt, 0}, the first argument is the functional of interest:
 Terminal <- 1
@@ -58,14 +58,16 @@
 ### An example of multivariate case: Heston model
 ## a <- 1;C <- 1;d <- 10;R<-.1
 ## diff.matrix <- matrix( c("x1*sqrt(x2)*e", "e*R*sqrt(x2)",0,"sqrt(x2*(1-R^2))*e"), 2,2)
-## model <- setModel(drift = c("a*x1","C*(10-x2)"), diffusion = diff.matrix,solve.variable=c("x1","x2"),state.variable=c("x1","x2"))
+## model <- setModel(drift = c("a*x1","C*(10-x2)"), 
+## diffusion = diff.matrix,solve.variable=c("x1","x2"),state.variable=c("x1","x2"))
 ## call option is evaluated by averating
 ## max{ (1/T)*int_0^T Xt^e dt, 0}, the first argument is the functional of interest:
 ##
 ## Terminal <- 1
 ## xinit <- c(1,1)
 ## 
-## f <- list( c(expression(0), expression(0)),   c(expression(0), expression(0)) , c(expression(0), expression(0))  )
+## f <- list( c(expression(0), expression(0)),   
+## c(expression(0), expression(0)) , c(expression(0), expression(0))  )
 ## F <- expression(x1,x2)
 ## 
 ## division <- 1000

Modified: pkg/yuima/man/cce.Rd
===================================================================
--- pkg/yuima/man/cce.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/cce.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -161,7 +161,8 @@
 cce(x,method="TSCV",K,c.two,J=1,adj=TRUE,utime,psd=FALSE)
 cce(x,method="GME",c.multi,utime,psd=FALSE)
 cce(x,method="RK",kernel,H,c.RK,eta=3/5,m=2,ftregion=0,utime,psd=FALSE)
-cce(x,method="QMLE",opt.method="BFGS",vol.init=NULL,covol.init=NULL,nvar.init=NULL,ncov.init=NULL,\dots,utime,psd=FALSE)
+cce(x,method="QMLE",opt.method="BFGS",vol.init=NULL,covol.init=NULL,
+ nvar.init=NULL,ncov.init=NULL,\dots,utime,psd=FALSE)
 cce(x,method="SIML",mn,alpha=0.4,psd=FALSE)
 cce(x,method="THY",threshold,psd=FALSE)
 cce(x,method="PTHY",theta,kn,g,threshold,refreshing=TRUE,cwise=TRUE,psd=FALSE)
@@ -314,9 +315,11 @@
 diff.coef.1 <- function(t, x1 = 0, x2 = 0) sqrt(1+t)
 diff.coef.2 <- function(t, x1 = 0, x2 = 0) sqrt(1+t^2)
 cor.rho <- function(t, x1 = 0, x2 = 0) sqrt(1/2)
-diff.coef.matrix <- matrix(c("diff.coef.1(t,x1,x2)", "diff.coef.2(t,x1,x2) * cor.rho(t,x1,x2)", 
+diff.coef.matrix <- matrix(c("diff.coef.1(t,x1,x2)", 
+"diff.coef.2(t,x1,x2) * cor.rho(t,x1,x2)", 
 "", "diff.coef.2(t,x1,x2) * sqrt(1-cor.rho(t,x1,x2)^2)"), 2, 2) 
-cor.mod <- setModel(drift = c("", ""), diffusion = diff.coef.matrix,solve.variable = c("x1", "x2")) 
+cor.mod <- setModel(drift = c("", ""), 
+diffusion = diff.coef.matrix,solve.variable = c("x1", "x2")) 
 
 set.seed(111) 
 
@@ -355,8 +358,11 @@
 diff.coef.1 <- function(t,x1,x2) sqrt(abs(x1))*sqrt(1+t)
 diff.coef.2 <- function(t,x1,x2) sqrt(abs(x2))
 cor.rho <- function(t,x1,x2) 1/(1+x1^2)
-diff.coef.matrix <- matrix(c("diff.coef.1(t,x1,x2)", "diff.coef.2(t,x1,x2) * cor.rho(t,x1,x2)","", "diff.coef.2(t,x1,x2) * sqrt(1-cor.rho(t,x1,x2)^2)"), 2, 2) 
-cor.mod <- setModel(drift = drift.coef.vector, diffusion = diff.coef.matrix,solve.variable = c("x1", "x2"))
+diff.coef.matrix <- matrix(c("diff.coef.1(t,x1,x2)", 
+"diff.coef.2(t,x1,x2) * cor.rho(t,x1,x2)","", 
+"diff.coef.2(t,x1,x2) * sqrt(1-cor.rho(t,x1,x2)^2)"), 2, 2) 
+cor.mod <- setModel(drift = drift.coef.vector,
+ diffusion = diff.coef.matrix,solve.variable = c("x1", "x2"))
 
 ## Generate a path of the process
 set.seed(111) 
@@ -369,10 +375,12 @@
 ## The "true" value of the quadratic covariation.
 cce(yuima)
 
-## We use the function poisson.random.sampling to generate nonsynchronous observations by Poisson sampling.
+## We use the function poisson.random.sampling to generate nonsynchronous 
+## observations by Poisson sampling.
 psample<- poisson.random.sampling(yuima, rate = c(0.2,0.3), n = 3000) 
 
-## cce takes the psample to return an estimated value  of the quadratic covariation. The off-diagonal elements are the value of the Hayashi-Yoshida estimator. 
+## cce takes the psample to return an estimated value  of the quadratic covariation. 
+## The off-diagonal elements are the value of the Hayashi-Yoshida estimator. 
 cce(psample)
 
 

Modified: pkg/yuima/man/limiting.gamma.Rd
===================================================================
--- pkg/yuima/man/limiting.gamma.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/limiting.gamma.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -30,7 +30,8 @@
 
 ## Yuima
 diff.matrix <- matrix(c("theta1"), 1, 1)
-myModel <- setModel(drift=c("(-1)*theta2*x"), diffusion=diff.matrix, time.variable="t", state.variable="x")
+myModel <- setModel(drift=c("(-1)*theta2*x"), diffusion=diff.matrix, 
+time.variable="t", state.variable="x")
 n <- 100
 mySampling <- setSampling(Terminal=(n)^(1/3), n=n)
 myYuima <- setYuima(model=myModel, sampling=mySampling)

Modified: pkg/yuima/man/llag.Rd
===================================================================
--- pkg/yuima/man/llag.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/llag.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -49,7 +49,8 @@
 diff.coef.matrix <- matrix(c("sqrt(x1)", "3/5*sqrt(x2)","1/3*sqrt(x3)", 
 "", "4/5*sqrt(x2)","2/3*sqrt(x3)","","","2/3*sqrt(x3)"), 3, 3) 
 drift <- c("1-x1","2*(10-x2)","3*(4-x3)")
-cor.mod <- setModel(drift = drift, diffusion = diff.coef.matrix,solve.variable = c("x1", "x2","x3")) 
+cor.mod <- setModel(drift = drift, diffusion = diff.coef.matrix,
+  solve.variable = c("x1", "x2","x3")) 
 
 set.seed(111) 
 

Modified: pkg/yuima/man/mmfrac.Rd
===================================================================
--- pkg/yuima/man/mmfrac.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/mmfrac.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -28,7 +28,8 @@
 See also \code{\link{qgv}}.
 }
 \examples{
-# Estimating all Hurst parameter, diffusion coefficient  and drift coefficient in fractional Ornstein-Uhlenbeck
+# Estimating all Hurst parameter, diffusion coefficient  and drift coefficient 
+# in fractional Ornstein-Uhlenbeck
 
 model<-setModel(drift="-x*lambda",hurst=NA,diffusion="theta")
 sampling<-setSampling(T=100,n=10000)

Modified: pkg/yuima/man/phi.test.Rd
===================================================================
--- pkg/yuima/man/phi.test.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/phi.test.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -39,8 +39,10 @@
 phi1 <- function(x) 1-x+x*log(x)
 
 phi.test(X, H0=h0, H1=h1,phi=phi1)
-phi.test(X, H0=h0, phi=phi1, start=h0, lower=list(t1=0.1, t2=0.1, t3=0.1), upper=list(t1=2,t2=2,t3=2),method="L-BFGS-B")
-phi.test(X, H0=h1, phi=phi1, start=h0, lower=list(t1=0.1, t2=0.1, t3=0.1), upper=list(t1=2,t2=2,t3=2),method="L-BFGS-B")
+phi.test(X, H0=h0, phi=phi1, start=h0, lower=list(t1=0.1, t2=0.1, t3=0.1), 
+   upper=list(t1=2,t2=2,t3=2),method="L-BFGS-B")
+phi.test(X, H0=h1, phi=phi1, start=h0, lower=list(t1=0.1, t2=0.1, t3=0.1), 
+  upper=list(t1=2,t2=2,t3=2),method="L-BFGS-B")
 }
  
 % Add one or more standard keywords, see file 'KEYWORDS' in the

Modified: pkg/yuima/man/qmle.Rd
===================================================================
--- pkg/yuima/man/qmle.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/qmle.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -19,7 +19,8 @@
 %ml.ql(yuima,theta2,theta1,h,theta2.lim=matrix(c(0,1),1,2),theta1.lim=matrix(c(0,1),1,2),print=FALSE,method,param,interval)
 %ql(yuima,theta2,theta1,h,print=FALSE,param)
 %rql(yuima,theta2,theta1,ptheta2,ptheta1,h,print=FALSE,param,prevparam)
-qmle(yuima, start, method="BFGS", fixed = list(), print=FALSE, lower, upper, joint=FALSE, Est.Incr="Carma.IncPar",aggregation=TRUE, ...)
+qmle(yuima, start, method="BFGS", fixed = list(), print=FALSE, lower, upper, 
+ joint=FALSE, Est.Incr="Carma.IncPar",aggregation=TRUE, ...)
 quasilogl(yuima, param, print=FALSE)
 }
 \arguments{
@@ -72,7 +73,8 @@
 \examples{
 #dXt^e = -theta2 * Xt^e * dt + theta1 * dWt
 diff.matrix <- matrix(c("theta1"), 1, 1)
-ymodel <- setModel(drift=c("(-1)*theta2*x"), diffusion=diff.matrix, time.variable="t", state.variable="x", solve.variable="x")
+ymodel <- setModel(drift=c("(-1)*theta2*x"), diffusion=diff.matrix, 
+  time.variable="t", state.variable="x", solve.variable="x")
 n <- 100
 
 ysamp <- setSampling(Terminal=(n)^(1/3), n=n) 
@@ -133,8 +135,8 @@
 ##print(coef(opt))
 
 
+\dontrun{
 
-
 ###multidimension case
 ##dXt^e = - drift.matrix * Xt^e * dt + diff.matrix * dWt
 diff.matrix <- matrix(c("theta1.1","theta1.2", "1", "1"), 2, 2)
@@ -150,7 +152,8 @@
 set.seed(123)
 
 ##xinit=c(x1, x2) #true.parameter=c(theta2.1, theta2.2, theta1.1, theta1.2)
-yuima <- simulate(yuima, xinit=c(1, 1), true.parameter=list(theta2.1=0.5, theta2.2=0.3, theta1.1=0.6, theta1.2=0.2))
+yuima <- simulate(yuima, xinit=c(1, 1), 
+true.parameter=list(theta2.1=0.5, theta2.2=0.3, theta1.1=0.6, theta1.2=0.2))
 
 ## theta2 <- c(0.8, 0.2) #c(theta2.1, theta2.2)
 ##theta1 <- c(0.7, 0.1) #c(theta1.1, theta1.2)
@@ -310,8 +313,8 @@
 
 plot(carmaopt3)
 
-
 }
+}
 
 
 % Add one or more standard keywords, see file 'KEYWORDS' in the

Modified: pkg/yuima/man/simulate.Rd
===================================================================
--- pkg/yuima/man/simulate.Rd	2014-03-19 11:46:11 UTC (rev 283)
+++ pkg/yuima/man/simulate.Rd	2014-03-19 12:39:08 UTC (rev 284)
@@ -93,8 +93,8 @@
 ou1 <- simulate(ou1, xinit=1, true.p = list(theta=-0.3))
 plot(ou1)
 
+\dontrun{
 
-
 # A multi-dimensional (correlated) diffusion process. 
 # To describe the following model: 
 # X=(X1,X2,X3); dXt = U(t,Xt)dt + V(t)dWt
@@ -278,7 +278,8 @@
 
 ##:: sample for Levy process ("code" type)
 ## dX_{t} = -x dt + dZ_t
-obj.model <- setModel(drift="-x", xinit=1, jump.coeff="1", measure.type="code", measure=list(df="rIG(z, 1, 0.1)"))
+obj.model <- setModel(drift="-x", xinit=1, jump.coeff="1", measure.type="code", 
+measure=list(df="rIG(z, 1, 0.1)"))
 obj.sampling <- setSampling(Terminal=10, n=10000)
 obj.yuima <- setYuima(model=obj.model, sampling=obj.sampling)
 result <- simulate(obj.yuima)
@@ -293,7 +294,9 @@
 ##  beta <- c(.1,.1)
 ##  mu <- c(0,0)
 ##  Lambda <- matrix(c(1,0,0,1),2,2)
-##  obj.model <- setModel(drift=c("1 - 2*x1-x2",".5-x1-2*x2"), xinit=c(1,1), solve.variable=c("x1","x2"), jump.coeff="1", measure.type="code", measure=list(df="rIG(z, alpha=1, beta=beta, mu=mu, Lambda=Lambda)"))
+##  obj.model <- setModel(drift=c("1 - 2*x1-x2",".5-x1-2*x2"), xinit=c(1,1), 
+## solve.variable=c("x1","x2"), jump.coeff="1", measure.type="code", 
+## measure=list(df="rIG(z, alpha=1, beta=beta, mu=mu, Lambda=Lambda)"))
 ##  obj.sampling <- setSampling(Terminal=10, n=10000)
 ##  obj.yuima <- setYuima(model=obj.model, sampling=obj.sampling)
 ##  result <- simulate(obj.yuima)	   
@@ -339,6 +342,6 @@
                      sampling=samp)
 
 plot(sim.carma1)
-
 }
+}
 \keyword{ts}



More information about the Yuima-commits mailing list