run.bayesian.vam | R Documentation |
For bayesian.vam
object, the method run.bayesian.vam
produces a sample from the posterior distribution of the parameters using a Gibbs sampling algorithm with a Metropolis Hasting step. The generated sample is memorized in the bayesian.vam
object and can be used in particular by the coef.bayesian.vam
and summary.bayesian.vam
to produce Bayesian estimators of the parameters.
run.bayesian.vam(obj,par0,fixed,sigma.proposal,nb=100000,burn=10000,profile.alpha=FALSE,method=NULL,verbose=FALSE,history=FALSE,proposal='norm',...)
obj |
an object of class |
par0 |
an optional argument specifying the initial parameter values for the Gibbs sampling method.
If |
fixed |
an optional argument specifying the parameters for which the value is fixed to initialization. |
sigma.proposal |
an optional argument specifying the standard deviation of the instrumental distribution of the Metropolis Hasting step of the Gibbs sampling algorithm. That can be a seldom value and then this standard distribution will be the same for all the parameters. Otherwise, it can be vector whose length is equal to the total number of parameters. |
nb |
an optional argument specifying when to stop the Gibbs sampling algorithm. If |
burn |
an optional argument specifying the number of burn in iterations of the Gibbs sampling algorithm. |
profile.alpha |
an optional argument specifying if the likelihood is profiled in |
method |
an optional argument to be used by the maximum likelihood method for computing the initialization of the Gibbs algorithm (see |
verbose |
an optional argument to be used by the maximum likelihood method for computing the initialization of the Gibbs algorithm (see |
history |
an optional argument defining how to stop the Gibbs sampling method and how to memorized its result. The plotting method |
proposal |
an optional argument specifying the instrumental distribution of the Metropolis Hasting step of the Gibbs sampling algorithm. Possible distributions are |
... |
some supplementary arguments for the maximum likelihood method used to compute the initialization of the Gibbs algorithm (see |
The standard deviation of the instrumental distribution of the Metropolis Hasting play an important part. It can be specified with the sigma.proposal
argument. If it is too big or too small regarding to the parameter value space, the sampling method can be very long to converge. In fact the standard deviations, sigma.proposal
, specifies how the marginal parameters spaces are explored. If the standard deviation is too small, only a little part of the parameter space is explored. If it is too big, the simulated parameters values would be ever rejected in the Metropolis Hasting step.
The function produces an sample of the posterior parameter value which is memorized in mle.vam
object. If history=FALSE
, the method produces a list whose length is equal to the total number of parameters. Each element of this list corresponds to the sampled values for a parameter (in the same order as they appears in par0
. If history=TRUE
, the method produces a data frame. Each accepted marginal sampled value of a parameter is alliteratively memorizes in this data frame. The column ind
specifies the index of the corresponding parameter (starting from 0). The sampled values is in the column estimate
. If profile.alpha=TRUE
, a third column called alpha
provides the corresponding estimate of \alpha
.
R. Drouilhet et L. Doyen
bayesian.vam
to define the Bayesian object.
coef.bayesian.vam
to extract the parameters estimation values of the Bayesian method.
summary.bayesian.vam
to produce a result summary of the Bayesian method.
hist.bayesian.vam
for plotting the histogram of the posterior distribution of the parameters.
plot.bayesian.vam
for plotting estimating characteristics of the model.
simARAInf<-sim.vam( ~ (ARAInf(.4) | Weibull(.001,2.5)))
simData<-simulate(simARAInf,30)
bayesARAInf <- bayesian.vam(Time & Type ~ (ARAInf(~Unif(0,1)) | Weibull(~Unif(0,1),~Unif(2,4))),data=simData)
run(bayesARAInf,profile.alpha=TRUE)
coef(bayesARAInf)
coef(bayesARAInf,par0=c(1e-2,2.5,0.5),fixed=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.