Question: Need help in R programming! X=rmvc(1e5,c(0,0),rbind(c(3,1),c(1,2))) This will generate a 1052 matrix of independent random samples from a two-dimensional Cauchy random vector with those given

Need help in R programming!
Need help in R programming! X=rmvc(1e5,c(0,0),rbind(c(3,1),c(1,2))) This will generate a 1052 matrix

X=rmvc(1e5,c(0,0),rbind(c(3,1),c(1,2))) This will generate a 1052 matrix of independent random samples from a two-dimensional Cauchy random vector with those given parameters. If we type plot(X) then we will notice the large majority of the samples are near the origin, but there are extreme outliers in all directions as this is a Cauchy random vector. Suppose that it is believed that these samples are described by a two-dimensional Cauchy and we wish to estimate the parameters. Let us write the unknown parameters as, Cauchy([a1a2],[a3a5a4a6]t[a3a5a4a6]) Use the maximum log-likelihood to estimate the optimal parameters. If you do this correctly then your answer should be close to how you generated the data. Here are some notes: (a) Every positive definite matrix can be factored as AtA, since the matrix parameters for the Cauchy must be positivedefinite we cannot just randomly pick a matrix as it might not be positive-definite which will lead to being undefined. (b) This is a six-dimensional optimization problem, you will need to use optim to search for a minimum and hope it is a global minimum. (c) To compute the likelihood of each sample you can use dmvc. The documentation page will show how to use it. (d) It is recommended to start the optimization algorithm with a guess of (0,0) and the identity matrix I2. Then you can try some other choices. X=rmvc(1e5,c(0,0),rbind(c(3,1),c(1,2))) This will generate a 1052 matrix of independent random samples from a two-dimensional Cauchy random vector with those given parameters. If we type plot(X) then we will notice the large majority of the samples are near the origin, but there are extreme outliers in all directions as this is a Cauchy random vector. Suppose that it is believed that these samples are described by a two-dimensional Cauchy and we wish to estimate the parameters. Let us write the unknown parameters as, Cauchy([a1a2],[a3a5a4a6]t[a3a5a4a6]) Use the maximum log-likelihood to estimate the optimal parameters. If you do this correctly then your answer should be close to how you generated the data. Here are some notes: (a) Every positive definite matrix can be factored as AtA, since the matrix parameters for the Cauchy must be positivedefinite we cannot just randomly pick a matrix as it might not be positive-definite which will lead to being undefined. (b) This is a six-dimensional optimization problem, you will need to use optim to search for a minimum and hope it is a global minimum. (c) To compute the likelihood of each sample you can use dmvc. The documentation page will show how to use it. (d) It is recommended to start the optimization algorithm with a guess of (0,0) and the identity matrix I2. Then you can try some other choices

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Accounting Questions!