Question: Using R, please simulate continuous data for y1, x1, x2, x3, x4, x5, x6. Then, Using the best subset selection method by writing your own
Using R, please simulate continuous data for y1, x1, x2, x3, x4, x5, x6. Then,

Using the best subset selection method by writing your own loop, i.e., consider all possible combination of covariates (yx1,yx1+x2,,yx1+x2+x3+x4+x5+x6), choose the best model based on the BIC criterion. Write down your final model. Note that BIC stands for Bayesian Information Criterion, which can be used to compare models. BIC=2log-likelihood+plog(n) where p is the number of parameters. The smaller the BIC, the better is the model fit
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
