R version 3.3.1 (2016-06-21) -- "Bug in Your Hair"
Copyright (C) 2016 The R Foundation for Statistical Computing
Platform: x86_64-pc-linux-gnu (64-bit)
R is free software and comes with ABSOLUTELY NO WARRANTY.
You are welcome to redistribute it under certain conditions.
Type 'license()' or 'licence()' for distribution details.
R is a collaborative project with many contributors.
Type 'contributors()' for more information and
'citation()' on how to cite R or R packages in publications.
Type 'demo()' for some demos, 'help()' for on-line help, or
'help.start()' for an HTML browser interface to help.
Type 'q()' to quit R.
> library(Sim.DiffProc)
Package 'Sim.DiffProc' version 3.2 loaded.
help(Sim.DiffProc) for summary information.
> png(filename="/home/ddbj/snapshot/RGM3/R_CC/result/Sim.DiffProc/Irates.Rd_%03d_medium.png", width=480, height=480)
> ### Name: Irates
> ### Title: Monthly Interest Rates
> ### Aliases: Irates
> ### Keywords: datasets
>
> ### ** Examples
>
> data(Irates)
> rates <- Irates[,"r1"]
> rates <- window(rates, start=1964.471, end=1989.333)
>
> ## CKLS modele vs CIR modele
> ## CKLS : dX(t) = (theta1+theta2* X(t))* dt + theta3 * X(t)^theta4 * dW(t)
>
> fx <- expression(theta[1]+theta[2]*x)
> gx <- expression(theta[3]*x^theta[4])
> fitmod <- fitsde(rates,drift=fx,diffusion=gx,pmle="euler",start = list(theta1=1,theta2=1,
+ theta3=1,theta4=1),optim.method = "L-BFGS-B")
> theta <- coef(fitmod)
>
> N <- length(rates)
> res <- snssde1d(drift=fx,diffusion=gx,M=200,t0=time(rates)[1],T=time(rates)[N],
+ Dt=deltat(rates),x0=rates[1],N)
> plot(res,plot.type="single",ylim=c(0,50))
> lines(rates,col=2,lwd=2)
> legend("topleft",c("real data","CKLS modele"),inset = .01,col=c(2,1),lwd=2,cex=0.8)
>
> dev.new()
Error in dev.new() : no suitable unused file name for pdf()
Execution halted