SeverityTrendResult

vecxt_re.SeverityTrendResult
case class SeverityTrendResult(nObs: Int, dfResidual: Int, intercept: Double, slope: Double, seIntercept: Double, seSlope: Double, tIntercept: Double, tSlope: Double, pValueIntercept: Double, pValueSlope: Double, sigma: Double, rSquared: Double, meanYear: Double, sxx: Double)

Result of fitting a severity trend: log(X) = β₀ + β₁·year + ε, by ordinary least squares.

exp(β₁) − 1 is the annual trend in the median (geometric mean) severity. If log(X) is normal with constant σ (a lognormal severity), it is also the annual trend in the mean.

Inference uses Student's t with n − 2 degrees of freedom, assuming independent residuals with constant variance. Residuals of log severity are often skewed (log of a Pareto is exponential). With small data volumes that makes the t-based intervals approximate, and single losses can dominate the fit: see TrendAnalysis.fitSeverityTrendLeaveOneOut. Read the result as a check for gross errors in the normalisation, not as a measurement of the trend.

Value parameters

dfResidual

Residual degrees of freedom (n − 2)

intercept

Estimated intercept (β₀), log scale

meanYear

Mean of the years, x̄

nObs

Number of losses

pValueIntercept

Two-tailed p-value for intercept (H₀: β₀ = 0)

pValueSlope

Two-tailed p-value for slope (H₀: β₁ = 0) - this tests for a significant severity trend

rSquared

Coefficient of determination

seIntercept

Standard error of intercept

seSlope

Standard error of slope

sigma

Residual standard deviation of log severity

slope

Estimated year coefficient (β₁), log scale

sxx

Σ(yearᵢ − x̄)²

tIntercept

t-statistic for intercept

tSlope

t-statistic for slope

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def annualTrend: Double

Annual trend in median severity, exp(β₁) − 1. 0.03 means +3% per year.

Annual trend in median severity, exp(β₁) − 1. 0.03 means +3% per year.

Attributes

def annualTrendCI(alpha: Double = ...): (lower: Double, upper: Double)

(1 − alpha) confidence interval for annualTrend.

(1 − alpha) confidence interval for annualTrend.

Attributes

def fittedLog(year: Double, alpha: Double = ...): (fit: Double, lower: Double, upper: Double)

Fitted log severity at year, with a (1 − alpha) confidence interval for the regression line.

Fitted log severity at year, with a (1 − alpha) confidence interval for the regression line.

Attributes

def hasSignificantTrend(alpha: Double = ...): Boolean

Test whether there is a statistically significant severity trend at the given alpha level

Test whether there is a statistically significant severity trend at the given alpha level

Attributes

def summary: String

Nicely formatted summary string, similar to R's lm summary output

Nicely formatted summary string, similar to R's lm summary output

Attributes

def tCritical(alpha: Double = ...): Double

Two-sided critical value t₁₋α/₂ with n − 2 degrees of freedom.

Two-sided critical value t₁₋α/₂ with n − 2 degrees of freedom.

Attributes

Inherited methods

def productElementNames: Iterator[String]

An iterator over the names of all the elements of this product.

An iterator over the names of all the elements of this product.

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

An iterator over all the elements of this product.

An iterator over all the elements of this product.

Attributes

Returns

in the default implementation, an Iterator[Any]

Inherited from:
Product