| calculate_likelihood {segmentr} | R Documentation |
Calculate a dataset's likelihood using change points of segmentr object
Description
Given the change points in a segmentr object, this function splits a
new dataset into segments and then calculates the total likelihood
using the likelihood function of the segmentr object.
Usage
calculate_likelihood(results, newdata, likelihood)
Arguments
results |
a segmentr object, which contains the definition of the change points to be applied |
newdata |
a dataset for which we wish to calculate the total likelihood |
likelihood |
a likelihood function to be used to calculate the likelihood of each segment |
Details
This function splits a newdata dataset into segments according to the
change points in the results segmentr object. It then uses the likelihood
function of the segmentr object to calculate the total likelihood of the new object.
[Package segmentr version 0.2.0 Index]