# NOT RUN {
################################################################################
##
## PEM Example: the GTE data
##
################################################################################
library(NGSSEML)
data(gte_data)
Ytm = gte_data$V1
## Event: failure, 1.
Event = gte_data$V2
Breakm = NGSSEML:::GridP(Ytm, Event, nT = NULL)
Xtm = NULL
Ztm = NULL
model = "PEM"
amp = FALSE
##LabelParTheta = c("w")
StaPar = c(0.9)
p = length(StaPar)
nn = length(Ytm)
a0 = 0.01
b0 = 0.01
## points
pointss = 4
## Posterior sample
nsamplex = 100
ci = 0.95
alpha = 1-ci
#Bayesian fit
fitbayes = ngssm.bayes(Ytm~Event, data = data.frame(Ytm, Event), model = model,
pz = NULL, amp = amp, a0 = a0, b0 = b0, prw = c(1, 1), prnu = NULL,
prchi = NULL, prmu= NULL, prbetamu = NULL, prbetasigma = NULL, ci = ci,
pointss = pointss, nsamplex = nsamplex, postplot = FALSE, contourplot = FALSE)
################################################################################
# }
Run the code above in your browser using DataLab