Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.

Messages - Darth Knight

Pages: [1] 2
1
Questions for R / RStudio (Fall 2023) / Re: Solutions to Lab 19,20,21,22
« on: December 10, 2023, 06:56:06 pm »
Sure. All those are uploaded.

2
Questions for R / RStudio (Fall 2023) / Re: Question for HW8
« on: October 31, 2023, 08:46:17 pm »
Sure. See the slide and class code.

3
We need to choose k that provides the minimum MSE.
That is our optimal level k.

Let say My.MSE is the vector of MSEs for different k values.
Then, which.min(My.MSE) will give you the index for the minimum MSE.
But, I still think the graph is good enough to find out the optimal k.

4
Questions for R / RStudio (Fall 2023) / Re: HW8 For Question 1
« on: October 31, 2023, 08:28:47 pm »
k is the index for the level of the trimmed mean.
So, the different k's will provide you different MSEs.

5
Yes, theta.st and theta.an are vectors that contains m number of MC approximations.


6
Hi,

There is nothing wrong with "NULL" to initiate a vector.
We should correct the actual body of the function content.

7
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.


8
Questions for R / RStudio (Fall 2023) / Re: HW7 Problem #4.
« on: October 23, 2023, 09:45:52 pm »
Hi Beryl,

Yes, you are correct.
It's a mistake, and we should remove arctan() when taking the inverse.
Thank you for posting the correction.

I've corrected the HW question and will grade the submitted homework accordingly.

9
Hi,

You must be using an if statement to distinguish between the cases when z>0 and z<0.

Yes, you need to address the Naive uniform approach.
For the case where z<0, please carefully review the arguments for "runif()"
and the value for the height of f(x).

However, you could consider moving the change of variable (COV) approach outside of the if statement.
You will notice that the COV approach works for any z values.

I hope this provides some help.

10
Questions for R / RStudio (Fall 2023) / Re: HW VI seed
« on: October 14, 2023, 12:00:26 am »
No. You don't need to put seeds for this HW.


11
Questions for R / RStudio (Fall 2023) / HW1: Problem #3-(v)
« on: September 08, 2023, 10:41:59 am »
I've received a few emails concerning sorting.
Since it's a character vector, standard sorting won't yield the desired results.

While there might be a specific R function that can address this,
we can visually inspect the order of dates and manually manipulate
the vector with a subsetting operator to incorporate the new observations.

This approach should suffice to answer the question.

12
Questions for R / RStudio (Fall 2023) / Re: Error in R ll Basics Lab
« on: September 03, 2023, 11:23:34 am »
No worries. It's a common mistake for this type of questions,
especially since matrix multiplication isn't symmetric.

13
Questions for R / RStudio (Fall 2023) / Re: Discrepncy in R ll Basics Lab
« on: September 01, 2023, 04:33:07 pm »
Thank you for pointing that out.
It will be acceptable either way,
and the graders will not deduct points for it.

14
Questions for R / RStudio (Fall 2023) / Re: Error in R ll Basics Lab
« on: September 01, 2023, 04:30:32 pm »
Sorry for late response.
X^TX becomes t(X)%*%X.

So, in your case, XTransposeX needs to be
TransposeX %*% X

15
Questions for R / RStudio (Spring 2023) / Re: Thank you!
« on: May 17, 2023, 08:13:20 pm »
Thank you, Cat.

I've also learned a lot from everyone.
I hope you have a great summer break!


Pages: [1] 2