Learn R Programming

beyondWhittle (version 1.0)

nuisanceModel_linearTrend: Normal linear trend model, with nuisance time series

Description

This class represents the linear trend model X_t=bt + mu + e_t, t=1,...,n, with intercept mu~N(mu.mu0,mu.sd^2) and slope b~N(b.mu1,b.sd^2) and e_t being a nuisance parameter time series.

Usage

nuisanceModel_linearTrend(mu.mu0 = 0, mu.sd = 10000, b.mu1 = 0,
  b.sd = 1, prop.scaling = 1)

Arguments

mu.mu0, mu.sd

A priori mean and standard deviation of mu

b.mu1, b.sd

A priori mean and standard deviation of b

prop.scaling

Scaling parameter for generating Metropolis-Hastings proposals of parameter of interest theta=c(mu,b)

Value

S3 nuisanceModel object representing the model parameter theta=c(mu,b) of interest, containing the following fields:

theta_dim

Dimension of parameter of interest (here: theta_dim=2)

excludeBoundary

Logical; Should the outermost Fourier frequencies be ignored in the frequency domain representation? (here: excludeBoundary=F)

get_noise

Function taking the two arguments data,theta to compute the nuisance/noise time series e_t from data and parameter theta of interest. (here: e_t=data-mu-b*(1:n))

propose_next_theta

Function taking the parameters data (Numeric vector of input data), f (Numeric Vector of current spectral density at the Fourier frequencies within the Gibbs sampling algorithm) and previous_theta (Previously sampled value of c(mu,b)) and returning a new proposal value for c(mu,b)

initialize_theta

Function taking the Numeric Vector data of input data as argument to generate an initial value for c(mu,b) to start an MCMC algorithm

lprior_theta

Function; Log density of prior of theta

Details

The parameters mu and b are assumed to be a priori independent. The returned object of this function is intended for usage within gibbs_AR_nuisance, gibbs_NP_nuisance and gibbs_NPC_nuisance. The method propose_next_theta is optimized to be close to the marginal joint posterior of (mu,b) in the model. The proposal scaling can be controlled with the parameter prop.scaling, where larger values yield a broader (smaller values yield narrower) proposal distribution.