Dear James, Basically you just need the values (y) and the positions (in your case it would be the index of the times series). The chromosome argument does not apply to your case so it can be a vector of ones. If the positions are at the same distance between (equally spaced) then the model will be homogeneous.
So for example something like this would be enough: > library(RJaCGH) > y <- c(rnorm(100,0,1), rnorm(20, 2, 1), rnorm(50, 0, 1)) > Pos <- 1:length(y) > Chrom <- rep(1, length(y)) > res <- RJaCGH(y=y, Pos=Pos, Chrom=Chrom) > summary(res) However, it uses a Reversible Jump algorithm and therefore jumps between models with different hidden states. I would suggest you take a look at the vignette that comes with the package or the paper that is referenced there for specific details of the model it fits. Hope it helps, Oscar On 28/2/12 04:52, "monkeylan" <lanjin...@yahoo.com.cn> wrote: > Dear Doctor Oscar, > > Sorry for not noticing that you are the author of the RJaCGH package. > > But I noticed that hidden Markov model in your package is with non-homogeneous > transition probabilities. Here in my work, the HMM is just a first-order > homogeneous Markov chain, i.e. the transition matrix is constant. > > So, Could you please tell me how can I adjust the R functions in your package > to implement my analysis? > > Best Regards, > > James Allan > > > --- 12年2月27日,周一, Oscar Rueda [via R] > <ml-node+s789695n4424152...@n4.nabble.com> 写道: > > > 发件人: Oscar Rueda [via R] <ml-node+s789695n4424152...@n4.nabble.com> > 主题: Re: Bayesian Hidden Markov Models > 收件人: "monkeylan" <lanjin...@yahoo.com.cn> > 日期: 2012年2月27日,周一,下午6:05 > > > Dear James, > Although designed for the analysis of copy number CGH microarrays, RJaCGH > uses a Bayesian HMM model. > > Cheers, > Oscar > > > On 27/2/12 08:32, "monkeylan" <[hidden email]> wrote: > > >> Dear R buddies, >> >> Recently, I attempt to model the US/RMB Exchange rate log-return time series >> with a *Hidden Markov model (first order Markov Chain & mixed Normal >> distributions). * >> >> I have applied the RHmm package to accomplish this task, but the results are >> not so satisfying. >> So, I would like to try a *Bayesian method *for the parameter estimation of >> the Hidden Markov model. >> >> Could anyone kindly tell me which R package can perform Bayesian estimation >> of the model? >> >> Many thanks for your help and time. >> >> Best Regards, >> James Allan >> >> >> -- >> View this message in context: >> http://r.789695.n4.nabble.com/Bayesian-Hidden-Markov-Models-tp4423946p4423946>> . >> html >> Sent from the R help mailing list archive at Nabble.com. >> >> ______________________________________________ >> [hidden email] mailing list >> https://stat.ethz.ch/mailman/listinfo/r-help >> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html >> and provide commented, minimal, self-contained, reproducible code. > Oscar M. Rueda, PhD. > Postdoctoral Research Fellow, Breast Cancer Functional Genomics. > Cancer Research UK Cambridge Research Institute. > Li Ka Shing Centre, Robinson Way. > Cambridge CB2 0RE > England > > > > > NOTICE AND DISCLAIMER > This e-mail (including any attachments) is intended for ...{{dropped:16}} > > ______________________________________________ > [hidden email] mailing list > https://stat.ethz.ch/mailman/listinfo/r-help > PLEASE do read the posting guide http://www.R-project.org/posting-guide.html > and provide commented, minimal, self-contained, reproducible code. > > > > > > > If you reply to this email, your message will be added to the discussion > below:http://r.789695.n4.nabble.com/Bayesian-Hidden-Markov-Models-tp4423946p44 > 24152.html > To unsubscribe from Bayesian Hidden Markov Models, click here. > NAML > > -- > View this message in context: > http://r.789695.n4.nabble.com/Bayesian-Hidden-Markov-Models-tp4423946p4427000. > html > Sent from the R help mailing list archive at Nabble.com. > [[alternative HTML version deleted]] > Oscar M. Rueda, PhD. Postdoctoral Research Fellow, Breast Cancer Functional Genomics. Cancer Research UK Cambridge Research Institute. Li Ka Shing Centre, Robinson Way. Cambridge CB2 0RE England NOTICE AND DISCLAIMER This e-mail (including any attachments) is intended for the above-named person(s). If you are not the intended recipient, notify the sender immediately, delete this email from your system and do not disclose or use for any purpose. We may monitor all incoming and outgoing emails in line with current legislation. We have taken steps to ensure that this email and attachments are free from any virus, but it remains your responsibility to ensure that viruses do not adversely affect you. Cancer Research UK Registered in England and Wales Company Registered Number: 4325234. Registered Charity Number: 1089464 and Scotland SC041666 Registered Office Address: Angel Building, 407 St John Street, London EC1V 4AD. ______________________________________________ R-help@r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code.