Question: For this question, you have to simulate some datasets. Let s assume the outcome Y depends linearly on 4 0 covariates X 1 , X
For this question, you have to simulate some datasets. Lets assume the outcome Y dependslinearly on covariates XXX The relationship is given by the following equation:Y beta beta Xbeta Xbeta Xa Marks Perform the following simulations. Generate training sets of size as follows: Generate random values for all X variables from a standard normal distribution.That is X NX NX N Generate also from a standard normal distribution: N Generate beta values from a Uniform distribution where beta to beta are simulatedfrom Uniform and beta to beta are simulated from Uniform Youcan choose any arbitrary value for beta Then generate Y using Note: You cannot use a for loop for this data generation. If you use a for loop,you will receive a zero for this section. Generate a test set of size as follows: Generate random values for all X variables from a standard normal distribution.That is X NX NX N Generate also from a standard normal distribution: N Use the same beta values generated for the training set. Then generate Y using Note: You cannot use a for loop for this data generation. If you use a for loop,you will receive a zero for this section.
Step by Step Solution
There are 3 Steps involved in it
1 Expert Approved Answer
Step: 1 Unlock
Question Has Been Solved by an Expert!
Get step-by-step solutions from verified subject matter experts
Step: 2 Unlock
Step: 3 Unlock
