Find alpha and beta parameter from Markov chain
Show older comments
Hello
A support from someone here. I need to find out both alpha and beta parameters applying mcmc.
I want to see Weibull and Lognormal distribution. But I don know how to apply log-likelihood model.ssfun into mcmc script with censored data.
Take a look the data below:
t (hrs) failed suspension total components
175 1 0 50
189 1 1 49
201 1 0 47
224 1 3 46
245 1 0 42
269 1 0 41
287 1 2 40
The mcmc matlab script that I have is shown below:
------------------------------------------------
load('data')
data.x=x;
data.y=y;
model.ssfun = ????;
model.N=length(x);
params = {
{'a',3, 0, 600}
{'b',2, 0, 10}
{'sig2',1, 0, 20}
};
options.nsimu=10000;
options.method='dram';
[results, chain, s2chain]= mcmcrun(model,data,params,options);
figure
mcmcplot(chain,[ ],results,'pairs');
figure
mcmcplot(chain,[ ],results,'denspanel',2);
chainstats(chain,results)
------------------------------------------------------------------------------
How can I write log-likelihood with suspended data at model.ssfun?
Many thanks
Answers (1)
Shravan
on 31 Jan 2023
0 votes
Alpha =8.5 Beta =2
Categories
Find more on MATLAB in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!