View source: R/Empirical_P_Values.R
getLogLik | R Documentation |
Takes in a vector of observations and a vector of changepoints. It returns the log-likelihood assuming that each segment between two changepoints follows a normal distribution. Optionally, the means, standard deviations, and lengths of each segment can be provided. If not provided, they are calculated.
getLogLik(series, changepoints, means=NA, sds=NA, segLengths=NA)
series |
A vector of observations on which to run changepoint analysis. This vector must not contain any missing values. |
changepoints |
A vector indicating the indices at which there are changepoints. A changepoint is located immediately prior to a shift in the series. |
means |
A optional vector where each entry corresponds to the mean of a segment. |
sds |
A optional vector where each entry corresponds to the standard deviation of a segment. |
segLengths |
A optional vector where each entry corresponds to the length of a segment. |
Returns the log likelihood (a numeric value).
Matthew Quinn
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.