Scenario

vecxt_re.Scenario
See theScenario companion object
case class Scenario(events: IndexedSeq[Event] = ..., numberIterations: Int = ..., threshold: Double = ..., day1: LocalDate = ..., name: String = ..., id: Long = ...)

Attributes

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

Members list

Value members

Concrete methods

inline def applyThreshold(newThresh: Double): Scenario
Extension method from vecxt_re
inline def removeClaimsAfter(date: LocalDate): Scenario
Extension method from vecxt_re
inline def removeClaimsBefore(date: LocalDate): Scenario
Extension method from vecxt_re
inline def scaleAmntBy(scale: Double): Scenario
Extension method from vecxt_re
def shiftDay1To(date: LocalDate): Scenario
Extension method from vecxt_re
def |+|(s2: Scenario): Scenario
Extension method from Scenario

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

Concrete fields

lazy val agg: Array[Double]
lazy val amounts: Array[Double]
lazy val claimDates: Array[LocalDate]
lazy val clusterCoeff: Double

Interpretation:

Interpretation:

  • Excess variance over Poisson, scaled by m^2: Var(X) = E[X] for Poisson, so (v - m) is the extra variance; dividing by m^2 scales it.
  • Method-of-moments estimate of 1/k for Negative Binomial: Var(X) = μ + μ^2 / k ⇒ (Var(X) - μ) / μ^2 = 1 / k. Thus, clusterCoeff estimates 1 / k. Smaller k (larger clusterCoeff) ⇒ more clustering/overdispersion.
  • Relation to Index of Dispersion (VMR = v / m): clusterCoeff = (v - m) / m^2 = (VMR - 1) / m. It is a mean-scaled excess dispersion; under NB, it targets 1 / k.

Attributes

lazy val days: Array[Int]
lazy val eventsSorted: Array[Event]
lazy val freq: Array[Int]
lazy val hasOccurence: Boolean
lazy val iterations: Array[Int]
lazy val itrDayAmount: (itr: Array[Int], days: Array[Int], amounts: Array[Double])
lazy val meanFreq: Double
lazy val meanLoss: Double
lazy val numSeasons: Int
lazy val period: (firstLoss: LocalDate, lastLoss: LocalDate)
lazy val varianceMeanRatio: Double

Computes the variance-to-mean ratio (dispersion) based on the frequency data. This metric is calculated by dividing the variance by the mean, using values from freq.meanAndVariance.

Computes the variance-to-mean ratio (dispersion) based on the frequency data. This metric is calculated by dividing the variance by the mean, using values from freq.meanAndVariance.

1 = poisson distributed > 1 => overdispersed... but careful with sample size.

Attributes