object DlmFsv
Model a heteroskedastic time series DLM by modelling the log-covariance of the observation variance as latent-factors
- Alphabetic
- By Inheritance
- DlmFsv
- AnyRef
- Any
- Hide All
- Show All
- Public
- All
Type Members
-
case class
State(p: DlmFsvParameters, theta: Vector[SamplingState], factors: Vector[(Double, Option[DenseVector[Double]])], volatility: Vector[SamplingState]) extends Product with Serializable
The state of the Gibbs Sampler
The state of the Gibbs Sampler
- p
the current parameters of the MCMC
- theta
the current state of the mean latent state (DLM state) of the DLM FSV model
- factors
the current state of the latent factors of the volatility
- volatility
the current state of the time varying variance of the observations
Value Members
-
final
def
!=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
##(): Int
- Definition Classes
- AnyRef → Any
-
final
def
==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
final
def
asInstanceOf[T0]: T0
- Definition Classes
- Any
-
def
buildDlmState(s: State): GibbsSampling.State
Transform the state of this sampler into the state for the DLM
-
def
buildFactorState(s: State): FactorSv.State
Transform the state of this sampler into the state for the FSV model
-
def
clone(): AnyRef
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )
-
final
def
eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
def
equals(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
-
def
factorObs(ys: Vector[Data], theta: Vector[SamplingState], f: (Double) ⇒ DenseMatrix[Double]): Vector[Data]
Center the observations to taking away the dynamic mean of the series
Center the observations to taking away the dynamic mean of the series
- theta
the state representing the evolving mean of the process
- f
the observation matrix: a function from time to a dense matrix
- returns
a vector containing the difference between the observations and dynamic mean
-
def
ffbsSvd(model: Dlm, ys: Vector[Data], p: DlmParameters, vs: Vector[DenseMatrix[Double]]): Rand[Vector[SamplingState]]
Perform forward filtering backward sampling using a time dependent observation variance and the SVD Filter
Perform forward filtering backward sampling using a time dependent observation variance and the SVD Filter
- model
a DLM model
- ys
the time series of observations
- p
DLM parameters containing sqrtW for SVD filter / sampler
- vs
a vector containing V_t the time dependent variances
-
def
finalize(): Unit
- Attributes
- protected[java.lang]
- Definition Classes
- AnyRef
- Annotations
- @throws( classOf[java.lang.Throwable] )
-
def
forecast(dlm: Dlm, p: DlmFsvParameters, ys: Vector[Data]): Traversable[KfState]
Perform a one-step forecast
-
final
def
getClass(): Class[_]
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
-
def
hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @native()
- def initialiseState(dlm: Dlm, ys: Vector[Data], params: DlmFsvParameters, p: Int, k: Int): State
-
final
def
isInstanceOf[T0]: Boolean
- Definition Classes
- Any
-
final
def
ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
-
final
def
notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
final
def
notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @native()
-
def
obsVolatility(as: Vector[(Double, DenseVector[Double])], xs: Vector[(Double, DenseVector[Double])], dlm: Dlm, p: DlmFsvParameters): Vector[(Double, DenseVector[Double])]
Simulate observations given realisations of the dlm state and log-volatility of the factors
Simulate observations given realisations of the dlm state and log-volatility of the factors
- as
the log-volatility
- xs
the state of the DLM
- dlm
a dlm model
- p
parameters of the DLM FSV model
-
def
observation(fs: Vector[(Double, Option[DenseVector[Double]])], theta: Vector[(Double, DenseVector[Double])], dlm: Dlm, p: DlmFsvParameters): Vector[(Double, Option[DenseVector[Double]])]
The observation model of the DLM FSV given the factors and the state
The observation model of the DLM FSV given the factors and the state
- fs
sampled factors
- theta
the state of the dlm
- dlm
the dlm model to use
- returns
a vector of observations
-
def
quantile[A](xs: Seq[A], prob: Double)(implicit arg0: Ordering[A]): A
Given a sequence of elements (typically draws from a distribution) with an implicit ordering select credible intervals
Given a sequence of elements (typically draws from a distribution) with an implicit ordering select credible intervals
- xs
a collection of elements
- prob
the interval to select from the sample (0, 1)
- returns
the sample corresponding to the prob credible interval
-
def
sample(priorBeta: Gaussian, priorSigmaEta: InverseGamma, priorPhi: Gaussian, priorMu: Gaussian, priorSigma: InverseGamma, priorW: InverseGamma, observations: Vector[Data], dlm: Dlm, initP: DlmFsvParameters): Process[State]
MCMC algorithm for DLM FSV with observation matrix having factor structure
- def sampleOu(priorBeta: Gaussian, priorSigmaEta: InverseGamma, priorPhi: Gaussian, priorMu: Gaussian, priorSigma: InverseGamma, priorW: InverseGamma, observations: Vector[Data], dlm: Dlm, initP: DlmFsvParameters): Process[State]
-
def
sampleStateAr(ys: Vector[Data], dlm: Dlm, params: DlmFsvParameters): Process[State]
Sample the factors, mean state and volatility while keeping the parameters constant
-
def
sampleStateOu(ys: Vector[Data], dlm: Dlm, params: DlmFsvParameters): Process[State]
Sample the factors, mean state and volatility while keeping the parameters constant
-
def
sampleStep(priorBeta: Gaussian, priorSigmaEta: InverseGamma, priorPhi: Gaussian, priorMu: Gaussian, priorSigma: InverseGamma, priorW: InverseGamma, observations: Vector[Data], dlm: Dlm, p: Int, k: Int)(s: State): Rand[State]
Perform a single step of the Gibbs Sampling algorithm for the DLM FSV model
-
def
simStep(time: Double, x: DenseVector[Double], a: Vector[Double], dlm: Dlm, p: DlmFsvParameters): Rand[(Data, DenseVector[Double], Vector[Double])]
Simulate a single step in the DLM FSV model
Simulate a single step in the DLM FSV model
- time
the time of the next observation
- x
the state of the DLM
- a
the state of the factor (latent state of the time varying variance)
- dlm
the DLM model to use for the evolution
- p
the parameters of the DLM and FSV Model
- returns
the next simulated value
-
def
simulate(dlm: Dlm, p: DlmFsvParameters): Process[(Data, DenseVector[Double], Vector[Double])]
Simulate from a DLM Factor Stochastic Volatility Model
Simulate from a DLM Factor Stochastic Volatility Model
- dlm
the dlm model
- p
dlm fsv model parameters
- returns
a vector of observations
- def stepOu(priorBeta: Gaussian, priorSigmaEta: InverseGamma, priorPhi: Beta, priorMu: Gaussian, priorSigma: InverseGamma, priorW: InverseGamma, observations: Vector[Data], dlm: Dlm, p: Int, k: Int)(s: State): Rand[State]
-
def
summariseInterpolation(obs: Vector[Vector[(Double, Option[Double])]], q: Double): Vector[(Double, Double, Double, Double)]
Calculate the mean and intervals of a single observation
Calculate the mean and intervals of a single observation
- obs
a vector of vector of observations
- q
the quantile to sample for the credible intervals
- returns
a vector containing the time, mean, upper and lower credible intervals
-
final
def
synchronized[T0](arg0: ⇒ T0): T0
- Definition Classes
- AnyRef
-
def
toString(): String
- Definition Classes
- AnyRef → Any
-
final
def
wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws( ... )
-
final
def
wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @native() @throws( ... )