'Estimates of unobserved factors
Returns
out: Bunch
Has the following attributes:
- `filtered`: a time series array with the filtered estimate of
the component
- `filtered_cov`: a time series array with the filtered estimate of
the variance/covariance of the component
- `smoothed`: a time series array with the smoothed estimate of
the component
- `smoothed_cov`: a time series array with the smoothed estimate of
the variance/covariance of the component
- `offset`: an integer giving the offset in the state vector where
this component begins'

@property
def factors(self):

    out = None
    spec = self.specification
    if (spec.k_factors > 0):
        offset = 0
        end = spec.k_factors
        res = self.filter_results
        out = Bunch(filtered=res.filtered_state[offset:end], filtered_cov=res.filtered_state_cov[offset:end, offset:end], smoothed=None, smoothed_cov=None, offset=offset)
        if (self.smoothed_state is not None):
            out.smoothed = self.smoothed_state[offset:end]
        if (self.smoothed_state_cov is not None):
            out.smoothed_cov = self.smoothed_state_cov[offset:end, offset:end]
    return out
