This section will run the basic onlineCPD function to output an ocpd object from the simulated data.

Printing the results shows a list of the attributes returned, and the main finding which is the output list of changepoints.

Following is some explanation of each attribute returned.

### Main Outputs

The main output from the OCPD objects are the changepoints list and the R matrix if the it is chosen to be returned.

- Changepoints List: list of changepoints computed from different approaches
- colmaxes: the list of changepoints taken from the maximum probability in each column of the R matrix
- threshchps: the list of changepoints that have run length probability above a threshold value, e.g. 0.5
- maxCPs: the list of changepoints with the highest overall probability

The list of possible changepoints can be accessed from the attribute “changepoint_lists”. The code and output from this example is shown below.

```
cpdf<- data.frame(method=names(ocpd1$changepoint_lists))
cpdf$changepoints<- unlist(ocpd1$changepoint_lists, recursive = FALSE)
kable(cpdf)
```

colmaxes |
c(1, 51, 71) |

threshcps |
c(1, 51, 71) |

maxCPs |
c(1, 51, 71) |

### Additional Outputs

Additional outputs are also returned - these are needed for running the algorithm online since this algorithm can work being called point by point to build on a pre-existing ocpd object, but not needed for interpreting the final results. These outputs are:

- ocpd_settings: stores the settings used in running the ocpd function
- prevR: the column of the R matrix for the previous step
- prevRprod, prevRsum: versions of the R matrix containing cumulative product or sum along diagonals
- prevDataPt: the previous data point processed - needed for replacing missing data options
- time: the total number of points processed within this ocpd object
- update_paramsT: the current parameters used in the UPM update functions
- update_params0: the initial parameters used in the UPM update functions
- init_params: the params used to initialize the UMP update_params0
- logprobcps, logprobmaxes: the list of changepoints with the highest probability at each step, and the probability associated respectively
- currmu: the current mu compute after each timepoint