| scores {EMJumpDiffusion} | R Documentation |
Compares calculated paths of viterbi with the original path.
scores(org, calc)
org |
Original path of jumps. |
calc |
Calculated path of jumps via viterbi. |
No data is returned. However, this function will tell you all necessary quantities.
## Data simulation
theta <- c(0.2, 0.1, 0.05, -0.5, 0.7) # vector for data simulation
X <- simulate(theta, 100) # simulates 100 log-returns
test <- c(0.3, -0.1, 0.1, 0.3, 1) # vector to test with viterbi
## Viterbi-algorithm calculation
calcpath <- viterbi(test, X[,1])
plot(calcpath, main="jumps", xlab="time", ylab="value")
## Comparison of original path with calculated path
scores(X[,2],calcpath)