Function for specifying ngme noise.
Please use noise_nig and noise_normal for simpler usage.
Use ngme_noise_types() to check all the available types.
Usage
ngme_noise(
noise_type,
mu = 0,
sigma = 1,
nu = 1,
B_mu = NULL,
theta_mu = NULL,
B_sigma = NULL,
theta_sigma = NULL,
B_nu = NULL,
theta_nu = NULL,
theta_sigma_normal = NULL,
B_sigma_normal = NULL,
fix_theta_mu = FALSE,
fix_theta_sigma = FALSE,
fix_rho = FALSE,
fix_theta_sigma_normal = FALSE,
fix_theta_nu = FALSE,
V = NULL,
fix_V = FALSE,
single_V = FALSE,
share_V = FALSE,
corr_measurement = FALSE,
index_corr = NULL,
map_corr = NULL,
nu_lower_bound = 0.01,
rho = double(0),
prior_mu = ngme_prior("normal", param = c(0, 0.01)),
prior_sigma = ngme_prior("normal", param = c(0, 0.01)),
prior_nu = ngme_prior("normal", param = c(0, 0.01)),
...
)
noise_normal(
sigma = NULL,
theta_sigma = NULL,
B_sigma = matrix(1),
corr_measurement = FALSE,
index_corr = NULL,
...
)
noise_nig(
mu = NULL,
sigma = NULL,
nu = NULL,
V = NULL,
theta_mu = NULL,
theta_sigma = NULL,
theta_nu = NULL,
nu_lower_bound = 0.01,
B_mu = matrix(1),
B_sigma = matrix(1),
B_nu = matrix(1),
corr_measurement = FALSE,
index_corr = NULL,
...
)
noise_gal(
mu = NULL,
sigma = NULL,
nu = NULL,
V = NULL,
theta_mu = NULL,
theta_sigma = NULL,
theta_nu = NULL,
nu_lower_bound = 0.01,
B_mu = matrix(1),
B_sigma = matrix(1),
B_nu = matrix(1),
corr_measurement = FALSE,
index_corr = NULL,
...
)
noise_skew_t(
mu = NULL,
sigma = NULL,
nu = NULL,
theta_mu = NULL,
theta_sigma = NULL,
theta_nu = NULL,
nu_lower_bound = 0.01,
B_mu = matrix(1),
B_sigma = matrix(1),
B_nu = matrix(1),
corr_measurement = FALSE,
index_corr = NULL,
...
)
noise_t(
nu = NULL,
theta_nu = NULL,
nu_lower_bound = 0.01,
B_nu = matrix(1),
corr_measurement = FALSE,
index_corr = NULL,
...
)
noise_normal_nig(
sigma_normal = NULL,
mu = NULL,
sigma_nig = NULL,
nu = NULL,
V = NULL,
theta_mu = NULL,
theta_sigma_nig = NULL,
theta_sigma_normal = NULL,
theta_nu = NULL,
B_mu = matrix(1),
B_sigma_nig = matrix(1),
B_sigma_normal = matrix(1),
B_nu = matrix(1),
corr_measurement = FALSE,
index_corr = NULL,
...
)Arguments
- noise_type
type of noise, "normal", "nig", "gal", "t", "skew_t"
- mu
specify the NIG noise parameter mu, see
?nig- sigma
specify the noise parameter sigma, see
?nig- B_mu
Basis matrix for mu (if non-stationary)
- theta_mu
specify a non-stationary noise using theta_mu
- B_sigma
Basis matrix for sigma (if non-stationary)
- theta_sigma
specify a non-stationary noise using theta_sigma
- B_nu
Basis matrix for nu (if non-stationary)
- theta_nu
specify a non-stationary noise using theta_nu
- theta_sigma_normal
for normal nosie with nig noise sharing same parameter
- B_sigma_normal
for normal nosie with nig noise sharing same parameter
- fix_theta_mu
fix the parameter of theta_mu
- fix_theta_sigma
fix the parameter of theta_sigma, can be a single logical value or a vector of logical values with length equal to length(theta_sigma)
- fix_rho
fix the parameter of rho
- fix_theta_sigma_normal
fix the parameter of sigma_normal, used in noise_normal_nig()
- fix_theta_nu
fix the parameter of nu
- V
start value for V
- fix_V
fix the sampling of V gives Y|W ~ N(mean * sigma, sigma^2)
- single_V
TRUE if V is a single number
used only for bivariate model
- corr_measurement
TRUE if we use correlated measurement noise
- index_corr
used when corr_measurement=TRUE, indicate which observation has correlation
- map_corr
1d, 2d, or formula, used when corr_measurement=TRUE, specify use which covariate to infer the index_corr.
- nu_lower_bound
specify the lower bound of parameter nu
- rho
used when corr_measurement=TRUE, starting point for correlation
- prior_mu
prior distribution for parameter of mu
- prior_sigma
prior distribution for parameter of sigma
- prior_nu
prior distribution for parameter of nu
- ...
additional arguments
- sigma_normal
for normal nosie with nig noise sharing same parameter
- sigma_nig
similar to sigma_normal
- theta_sigma_nig
similar to theta_sigma_normal
- B_sigma_nig
similar to B_sigma_nig
Details
The parameterization is given in ?nig and ?gal. Moreover,
for specifying non-stationary mu and sigma, nu
$$\mu = B_{\mu} \theta_{\mu},$$ and
$$\sigma = \exp (B_{\sigma} \theta_{\sigma}),$$
$$\nu = \exp (B_{\nu} \theta_{\nu}).$$
Examples
noise_normal(sigma = 2)
#> Noise type: NORMAL
#> Noise parameters:
#> sigma = 2
noise_nig(mu = 1, sigma = 2, nu = 1)
#> Noise type: NIG
#> Noise parameters:
#> mu = 1
#> sigma = 2
#> nu = 1
noise_gal(mu = 1, sigma = 2, nu = 1)
#> Noise type: GAL
#> Noise parameters:
#> mu = 1
#> sigma = 2
#> nu = 1
noise_skew_t(mu = 0, sigma = 1, nu = 5)
#> Noise type: SKEW_T
#> Noise parameters:
#> mu = 0
#> sigma = 1
#> nu = 5
noise_t(nu = 5)
#> Noise type: T
#> Noise parameters:
#> nu = 5
