powered by
Random number generator via Metropolis-Hastings algorithm.
metropolis_sampler( initial_value, n = n, proposal_shape = 1, proposal_scale = 1, theta = 1, proportion = 0.5, mu = 1, kappas = 0.9, burnin = 0, lag = 1 )
A dataframe consisting of the sampled values and acceptance rate
initial values
number of draws
Weibull's shape parameter in the proposal
Weibull's scale parameter in the proposal
cure rate parameter (log scale)
proportions data
mean survival time
Weibull's true shape parameter
length of burn-in period
discarding lag-1 values in the Metropolis step
times <- metropolis_sampler(10, 5)
Run the code above in your browser using DataLab