Learn R Programming

NGSSEML (version 1.0)

PriorF: Prior Function

Description

This function computes the probability density function of the specified prior for the static parameters of the model.

Usage

PriorF(StaPar,model="Poisson",prw=c(1,1),prnu=NULL,prchi=NULL,prmu=NULL,
prbetamu=NULL,prbetasigma=NULL)

Arguments

StaPar

the static parameter vector.

model

the chosen model for the observations. The options are: Poisson, Normal, Gamma, Weibull, Generalized Gamma, Laplace, GED and PEM models.

prw

the numeric vector of length 2, indicating the hyperparameters of the Beta prior distribution for the parameter w. Optional argument. The default value is c(1,1), which constitutes an uninformative prior for common data sets.

prnu

the numeric vector of length 2, indicating the hyperparameters of the Gamma prior distribution for the shape parameter nu. Optional argument. The default value is NULL.

prchi

the numeric vector of length 2, indicating the hyperparameters of the Gamma prior distribution for the shape parameter chi. Optional argument. The default value is NULL.

prmu

the numeric vector of length 2, indicating the mean and standard deviation for the Gaussian prior distribution for the parameter mu. Optional argument. The default value is NULL. This prior can be used in Normal, Laplace and GED time series models.

prbetamu

the numeric vector of length p, indicating mean for the Gaussian prior distribution for the parameter beta, the regression coefficients. Optional argument. The default value is NULL.

prbetasigma

the numeric matrix of order p by p, indicating variance-covariance matrix of the Gaussian prior distribution for the parameter beta, the regression coefficients. Optional argument. The default value is NULL.

Value

llik

This function returns the probability density of the specified prior for the static parameters of the model.

Details

Typical usages are

PriorF(StaPar,model="Poisson",prw=c(1,1),prnu=NULL,prchi=NULL,
prmu=NULL,prbetamu=NULL,prbetasigma=NULL)

References

Gamerman, D., Santos, T. R., and Franco, G. C. (2013). A Non-Gaussian Family of State-Space Models with Exact Marginal Likelihood. Journal of Time Series Analysis, 34(6), 625-645.

Santos T. R., Gamerman, D., Franco, G. C. (2017). Reliability Analysis via Non-Gaussian State-Space Models. IEEE Transactions on Reliability, 66, 309-318.

See Also

ngssm.bayes SmoothingF

Examples

Run this code
# NOT RUN {
library(NGSSEML)
#Trend,CosAnnual,SinAnnual,CosSemiAnnual,SinSemiAnnual
LabelParTheta=c("w","Beta1","Beta2","Beta3","Beta4","Beta5")
StaPar=c(0.8,-0.1,0.01,0.01,0.01,0.01)
PriorF(StaPar,model="Poisson",prw=c(1,1),prnu=NULL,prchi=NULL,prmu=NULL,
prbetamu=rep(0,5),prbetasigma=diag(4, 5, 5))

# }

Run the code above in your browser using DataLab