scores {EMJumpDiffusion}R Documentation

Compare real to calculated data

Description

Compares calculated paths of viterbi with the original path.

Usage

scores(org, calc)

Arguments

org Original path of jumps.
calc Calculated path of jumps via viterbi.

Value

No data is returned. However, this function will tell you all necessary quantities.

Examples

        ## 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)

[Package EMJumpDiffusion version 1.4.1 Index]