fitted.clv.fitted {CLVTools} | R Documentation |

## Extract Unconditional Expectation

### Description

Extract the unconditional expectation (future transactions unconditional on being "alive") from a fitted clv model. This is the unconditional expectation data that is used when plotting the fitted model.

### Usage

```
## S3 method for class 'clv.fitted'
fitted(object, prediction.end = NULL, verbose = FALSE, ...)
```

### Arguments

`object` |
A fitted clv model for which the unconditional expectation is desired. |

`prediction.end` |
Until what point in time to predict. This can be the number of periods (numeric) or a form of date/time object. See details. |

`verbose` |
Show details about the running of the function. |

`...` |
Ignored |

### Details

`prediction.end`

indicates until when to predict or plot and can be given as either
a point in time (of class `Date`

, `POSIXct`

, or `character`

) or the number of periods.
If `prediction.end`

is of class character, the date/time format set when creating the data object is used for parsing.
If `prediction.end`

is the number of periods, the end of the fitting period serves as the reference point
from which periods are counted. Only full periods may be specified.
If `prediction.end`

is omitted or NULL, it defaults to the end of the holdout period if present and to the
end of the estimation period otherwise.

The first prediction period is defined to start right after the end of the estimation period.
If for example weekly time units are used and the estimation period ends on Sunday 2019-01-01, then the first day
of the first prediction period is Monday 2019-01-02. Each prediction period includes a total of 7 days and
the first prediction period therefore will end on, and include, Sunday 2019-01-08. Subsequent prediction periods
again start on Mondays and end on Sundays.
If `prediction.end`

indicates a timepoint on which to end, this timepoint is included in the prediction period.

### Value

A `data.table`

which contains the following columns:

`period.until` |
The timepoint that marks the end (up until and including) of the period to which the data in this row refers. |

`period.num` |
The number of this period. |

`expectation` |
The value of the unconditional expectation for the period that ends on |

### See Also

`plot`

to plot the unconditional expectation

*CLVTools*version 0.10.0 Index]