fit.plot {SIMle}R Documentation

Visualization of estimation

Description

Visualization of estimation

Usage

fit.plot(
  res_esti,
  ops,
  mp_type,
  title = "",
  lower = -1.3,
  upper = 1.3,
  domain = 10
)

Arguments

res_esti

the result of estimation

ops

select type of estimation."nfix" refers to no fix estimation. "fixt" indicates fix time t estimation. "fixx" represents fix variate estimation

mp_type

select type of mapping function, "algeb" indicates algebraic mapping on the real line. "logari" represents logarithmic mapping on the real line

title

give the title for plot

lower

give the lower bound for scale limits, the default is -1.3

upper

give the upper bound for scale limits, the default is 1.3

domain

The upper bound for the variate basis domain. The default value is 10. When "algeb" or "logari" is chosen, the domain is automatically set from -domain to domain.

Value

the plot shows estimated function

Examples

generate_nAR1 = function(n, v){
 ts = c()
 w = rnorm(n, 0, 1/v)
 x_ini = runif(1,0,1)
 for(i in 1:n){
   if(i == 1){
     ts[i] = sin(2*pi*(i/n))*exp(-x_ini^2)  + w[i] #
   } else{
     ts[i] = sin(2*pi*(i/n))*exp(-ts[i-1]^2) + w[i]
   }
 }
 return(ts)
}
ts  = generate_nAR1(200, 1) # change sample size in real case
res_esti = fix.fit(ts, 5, 2, "Legen", "Legen", "algeb", "fixt", 0.1)
fit.plot(res_esti[[1]], "fixt", "algeb")

[Package SIMle version 0.1.0 Index]