def __get_tail_se(self):
""" Method to produce the standard error of the Mack Chainladder
model tail factor
Returns:
This calculation is consistent with the R calculation
MackChainLadder$tail.se
"""
tailse = np.array(self.sigma[-2] / \
np.sqrt(self.full_triangle.iloc[0, -3]**self.alpha[-1]))
if self.chainladder.tail == True:
time_pd = self.__get_tail_weighted_time_period()
fse = np.append(self.fse, tailse)
x = np.array([i + 1 for i in range(len(fse))])
fse_reg = stats.linregress(x, np.log(fse))
tailse = np.append(tailse, np.exp(time_pd * fse_reg[0] + fse_reg[1]))
else:
tailse = np.append(tailse,0)
return tailse
评论列表
文章目录