Learn R Programming

Sie2nts (version 0.1.0)

fix.plot: Plot Results of Estimating

Description

fix.plot() visualizes the estimation of coefficient.

Usage

fix.plot(res.fix.fit, type, title = "")

Value

A list which contains 3 plot related to the estimation of coefficient, Elbow point and cross validation in order

Arguments

res.fix.fit

the output from fix.fit() function

type

type indicates which type of basis is used (There are 31 types in this package)

title

give the title for the fixed estimate plot

Examples

Run this code
set.seed(137)
time.series = c()
n = 1024
v = 25
w = rnorm(n, 0, 1) / v
x_ini = runif(1,0,1)
for(i in 1:n){
  if(i == 1){
    time.series[i] = 0.2 + 0.6*cos(2*pi*(i/n))*x_ini  + w[i] #
  } else{
    time.series[i] = 0.2 + 0.6*cos(2*pi*(i/n))*time.series[i-1] + w[i]
  }
}

res1 = fix.fit(time.series, 5, 1, type = "Legen")
fix.plot(res1, "Legen")

Run the code above in your browser using DataLab