DIR Return Create A Forum - Home
---------------------------------------------------------
QA_Board
HTML https://qaboard.createaforum.com
---------------------------------------------------------
*****************************************************
DIR Return to: Questions for R / RStudio (Fall 2023)
*****************************************************
#Post#: 133--------------------------------------------------
Question for HW7 Question 2 ii)
By: YuyangWu Date: October 27, 2023, 5:59 pm
---------------------------------------------------------
The question requires us to evaluate the MC approximation by
using the similar code in question 1. Therefore, I modify the x
generate from Inverse cdf and pass the result into g(x). And the
following steps are same with the Question1. However, my result
is generate the NaN. I did not what's happened. Thank you so
much!
#Post#: 134--------------------------------------------------
Re: Question for HW7 Question 2 ii)
By: Taeho Kim Date: October 27, 2023, 6:05 pm
---------------------------------------------------------
Hi,
You should apply the functions g and F^-1 in a right order for u
and 1-u.
Please carefully review PAGES 18-19
HTML https://drive.google.com/file/d/1eSovvzhx0_h-qVz36dI1eW0_8domq9Yg/view.
#Post#: 135--------------------------------------------------
Re: Question for HW7 Question 2 iii)
By: YuyangWu Date: October 27, 2023, 6:22 pm
---------------------------------------------------------
Thank you for previous question suggestion. I meet another
question for Q2 iii) similar with the Question 1, I found, if we
initiate the theta.st <- NULL and theta.an <- NULL. The ide will
returan error for in var(theta.an) : 'x' is NULL. In order solve
this question, could we able to use the numeric?
#Post#: 136--------------------------------------------------
Re: Question for HW7 Question 2 ii)
By: Taeho Kim Date: October 27, 2023, 6:30 pm
---------------------------------------------------------
Hi,
There is nothing wrong with "NULL" to initiate a vector.
We should correct the actual body of the function content.
#Post#: 137--------------------------------------------------
Re: Question for HW7 Question 2 ii)
By: YuyangWu Date: October 27, 2023, 6:32 pm
---------------------------------------------------------
Hi Darth, I found the question. I forgot the theta should be a
vector. :'( :'( :'( :'( :'( :'(
#Post#: 138--------------------------------------------------
Re: Question for HW7 Question 2 ii)
By: Taeho Kim Date: October 27, 2023, 7:45 pm
---------------------------------------------------------
Yes, theta.st and theta.an are vectors that contains m number of
MC approximations.
*****************************************************