# NOT RUN {
################################################################################
##
## PEM Example: the GTE data
##
################################################################################
library(NGSSEML)
#### Inputs:
data(gte_data)
Ytm=gte_data$V1
Event=gte_data$V2 # Event: failure, 1.
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
#pointss=500000 ### points
pointss=6 ### points
nsamplex=300 ## Sampling posterior
ci=0.95
alpha=1-ci
#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