Running examples in 'yuima-Ex.R' failed
The error most likely occurred in:

> ### Name: setYuima
> ### Title: Creates a "yuima" object by combining "model", "data",
> ###   "sampling", "characteristic" and "functional"slots.
> ### Aliases: setYuima
> ### Keywords: ts
> 
> ### ** Examples
> 
> # Creation of a yuima object with all slots for a 
> # stochastic differential equation
> # dXt^e = -theta2 * Xt^e * dt + theta1 * dWt 
> diffusion <- matrix(c("theta1"), 1, 1)
> drift <- c("-1*theta2*x")
> ymodel <- setModel(drift=drift, diffusion=diffusion)
Warning in yuima.warn("Solution variable (lhs) not specified. Trying to use state variables.") :
  
YUIMA: Solution variable (lhs) not specified. Trying to use state variables.

> n <- 100
> ysamp <- setSampling(Terminal=1, n=n)
Warning in yuima.warn("'delta' (re)defined.") :
  
YUIMA: 'delta' (re)defined.

> 
> yuima <- setYuima(model=ymodel, sampling=ysamp)
> 
> str(yuima)
Formal class 'yuima' [package "yuima"] with 5 slots
  ..@ data          :Formal class 'yuima.data' [package "yuima"] with 2 slots
  .. .. ..@ original.data: NULL
  .. .. ..@ zoo.data     : NULL
  ..@ model         :Formal class 'yuima.model' [package "yuima"] with 16 slots
  .. .. ..@ drift          :  expression((-1 * theta2 * x))
  .. .. ..@ diffusion      :List of 1
  .. .. .. ..$ :  
@ :0.5:> str(res)
Formal class 'yuima.snr' [package "yuima"] with 4 slots
  ..@ call : language snr(yuima = yuima, start = start, lower = lower, upper = upper)
  ..@ coef : Named num [1:2] 2.78 3
  .. ..- attr(*, "names")= chr [1:2] "theta" "theta1"
  ..@ snr  : num [1:9999] -0.5588 -0.2265 1.5614 0.0681 0.1266 ...
  ..@ model:Formal class 'yuima.model' [package "yuima"] with 16 slots
  .. .. ..@ drift          :  expression((-theta * x))
  .. .. ..@ diffusion      :List of 1
  .. .. .. ..$ :  expression((theta1/sqrt(1 + x^2)))
  .. .. ..@ hurst          : num 0.5
  .. .. ..@ jump.coeff     : list()
  .. .. ..@ measure        : list()
  .. .. ..@ measure.type   : chr(0) 
  .. .. ..@ parameter      :Formal class 'model.parameter' [package "yuima"] with 7 slots
  .. .. .. .. ..@ all      : chr [1:2] "theta" "theta1"
  .. .. .. .. ..@ common   : chr(0) 
  .. .. .. .. ..@ diffusion: chr "theta1"
  .. .. .. .. ..@ drift    : chr "theta"
  .. .. .. .. ..@ jump     : chr(0) 
  .. .. .. .. ..@ measure  : chr(0) 
  .. .. .. .. ..@ xinit    : chr(0) 
  .. .. ..@ state.variable : chr "x"
  .. .. ..@ jump.variable  : chr(0) 
  .. .. ..@ time.variable  : chr "t"
  .. .. ..@ noise.number   : num 1
  .. .. ..@ equation.number: int 1
  .. .. ..@ dimension      : int [1:6] 2 0 1 1 0 0
  .. .. ..@ solve.variable : chr "x"
  .. .. ..@ xinit          :  expression(0)
  .. .. ..@ J.flag         : logi FALSE
> 
> # Test code (2.jump diffusion case)
> a<-3
> b<-5
> mod <- setModel(drift="10-theta*x", #drift="10-3*x/(1+x^2)",
+                 diffusion="theta1*(2+x^2)/(1+x^2)",
+                 jump.coeff="1",
+                 # measure=list(intensity="10",df=list("dgamma(z, a, b)")),
+                 measure=list(intensity="10",df=list("dunif(z, a, b)")),
+                 measure.type="CP")
Warning in yuima.warn("Solution variable (lhs) not specified. Trying to use state variables.") :
  
YUIMA: Solution variable (lhs) not specified. Trying to use state variables.

> 
> T <- 100 ## Terminal
> n <- 10000 ## generation size
> samp <- setSampling(Terminal=T, n=n) ## define sampling scheme
Warning in yuima.warn("'delta' (re)defined.") :
  
YUIMA: 'delta' (re)defined.

> yuima <- setYuima(model = mod, sampling = samp)
> 
> yuima <- simulate(yuima, xinit=1,
+                   true.parameter=list(theta=2,theta1=sqrt(2),a=a,b=b), 
+                   sampling = samp)
> start=list(theta=3,theta1=0.5)
> lower=list(theta=1,theta1=0.3)
> upper=list(theta=5,theta1=3)
> res <- snr(yuima,start,lower,upper)
Error in plot.new() : write failed
Calls: snr ... hist -> hist.default -> plot -> plot.histogram -> plot.new
Execution halted
Error: internal read error in PDF_endpage
Fatal error: error during cleanup