URI:
   DIR Return Create A Forum - Home
       ---------------------------------------------------------
       QA_Board
  HTML https://qaboard.createaforum.com
       ---------------------------------------------------------
       *****************************************************
   DIR Return to: Questions for R / RStudio (Spring 2023)
       *****************************************************
       #Post#: 69--------------------------------------------------
       HW 9 #1
       By: Kieran OConnor Date: April 11, 2023, 4:35 pm
       ---------------------------------------------------------
       When I try to implement Unif(0,0.2) as the initial candidate
       density, I get divide by zero errors since if it generates a
       negative number, then dbeta(x,12,12) is 0, causing the DENOM to
       be 0. Wouldn't it make more sense for the candidate density to
       be unif(0.5,0.2) since that matches the dbeta distribution more?
       #Post#: 70--------------------------------------------------
       Re: HW 9 #1
       By: Taeho Kim Date: April 11, 2023, 7:35 pm
       ---------------------------------------------------------
       Sure, Kieran.
       Uniform(0,0.2) is not an ideal choice, but I imposed it to
       create a burn-in stage in this HW.
       It never generates a negative value in its initial stage,
       but you could have it in its second or third stages, causing the
       denominator to be 0.
       In general, the candidate density has a higher tendency to move
       to the right-hand side.
       So, I would say it is quite rare to have the situation in this
       particular example.
       Yes, Uniform(0.4,0.6) would be a better choice
       since it is closer to the target density.
       Then there will be essentially no burn-in stage,
       so we could use the whole Markov Chain.
       *****************************************************