- Parent Category: Programming Assignments' Solutions
We Helped With This Statistics with R Programming Assignment: Have A Similar One?
|Subject||R | R Studio|
|More Info||Psychology Statistics Homework Help|
Short Assignment Requirements
I need a R code for creating plots using the Random Walk Metropolis algorithm. I want to replicate the figures 5.6 and 5.7 in pages 131 and 132 of the file. The example is described in Section 126.96.36.199, or from pages 130 to 132, and uses the RWM algorithm to sample from a target distribution that is a 100- dimensional multivariate Gaussian distribution in which the variables are independent, with means of zero, and standard deviations of 0.01, 0.02, . . . , 0.99, 1.00. I have already created the plots on the right side, those corresponding to HMC algorithm. Thus, if you look at the code that I have attached as HMC.R, the codes for creating the figures 5.6 and 5.7 can be recycled for this. However, I have been unable to write a code for the random-walk Metropolis with proposal standard deviation drawn uniformly from (0.0176,0.0264) as they have done in the book, giving rejection rate of 0.75. Also, I do not know how to create plots counting 150 RWM updates as one iteration. Thus here in total we need 150*1000 iterations and combine 150 iterations into one.