Products | Versions |
---|---|
Spotfire S+ | All supported versions |
There is a bug in the FlexBayes library Help Files. If you run one of the examples from the bhpm() Help File:
##########################################
# Use bhpm to fit an overdispersed Poisson model to the
# pumps data
xi.prior = bayes.uniformShrinkage (0.5)
random.var.prior = bayes.invWishart( df = 3, scale = diag( c(1,1) ) )
pump.prior = bhpm.prior ( xi = xi.prior,
random.var = random.var.prior,
common.glm = 2 )
# Specify the control parameters (burn-in length,
# etc.) and the initial values for the parameters.
pump.sampler <- bhpm.sampler( nSamples=1000, nThin= 50,
nChains = 1, nBurnin = 1000,
init.point = "prior", update.cov = 0 )
pump.exposure <- ~ e
pump.random <- z ~ 1 + x
## call bhpm to fit a gamma-conjugate model
pump.bhpm <- bhpm( random.formula = pump.random,
exposure.formula = pump.exposure, data = pumps,
prior = pump.prior, sampler = pump.sampler,
overdispersion = "gamma-conj" )
# check convergence
autocorr.plot(pump.bhpm)
# summarize the posterior distribution
summary(pump.bhpm)
##########################################
> pump.bhpm <- bhpm(random.formula = pump.random, exposure.formula = pump.exposure, data = pumps, prior = pump.prior,
sampler = pump.sampler, overdispersion = "gamma-conj")
Problem in mcmc: argument burnin= not matched: mcmc(data = post.samples, thin = sampleFrequency, burnin = burnInLength)
Use traceback() to see the call stack
> traceback()
10: eval(action, sys.parent())
9: doErrorAction("Problem in mcmc: argument burnin= not matched: mcmc(data = post.samples, thin = sampleFrequency, burnin = burnInLength)",
8: mcmc(data = post.samples, thin = sampleFrequency, burnin = burnInLength)
7: fit.bayeshpm(n.groups, n.responses, dim.random, dim.fixed, dim.level2, exposure.in.model, response.names,
6: bhpm(random.formula = pump.random, exposure.formula = pump.exposure, data = pumps, prior = pump.prior, sampler =
5: eval(i, local)
4: source(auto.print = auto.print, exprs = substitute(exprs.literal))
3: script.run(exprs.literal = {
2: eval(expression(script.run(exprs.literal = {
1:
Message: Problem in mcmc: argument burnin= not matched: mcmc(data = post.samples, thin = sampleFrequency, burnin = burnInLength)
###########################################