Initial: Specify the prior for the initial value of the trend term in...

View source: R/SpecPrior-generators.R

InitialR Documentation

Specify the prior for the initial value of the trend term in a DLM prior.

Description

Specify the prior for the initial value of the trend term, typically as part of a call to function Trend.

Usage

Initial(mean = 0, sd = NULL, mult = 1)

Arguments

mean

The mean of the prior distribution. Defaults to 0.

sd

The standard deviation of the prior distribution.

mult

Multiplier applied to scale if scale is generated automatically. Defaults to 1.

Details

In the linear trend version of a DLM prior, the trend term has the form

trend[0] ~ N(mean, sd^2) trend[j] ~ damp * trend[j-1] + errorLevel[j], j = 1,...,J.

By default, the mean in the prior for trend[0] defaults to 0. The default for the sd is set using the same rules as the default for the scale term in a HalfT prior.

Value

An object of class Initial.

See Also

Initial is usually called as part of a call to function Trend.

Examples

Initial()
Initial(mean = 0.1, sd = 0.3)
Initial(mean = 0.02, mult = 0.1)

StatisticsNZ/demest documentation built on Nov. 2, 2023, 7:56 p.m.