n=5; p=4;u=randn(n, p);X= sqrt(1-r*r)*u + r*u;e=normrnd(0*eye(n),5*(n))beta0=[4;3;2.3;1];y=X*beta0*(eye(n))'+e;
MATLAB: How to correct the below code
multiple regression
multiple regression
n=5; p=4;u=randn(n, p);X= sqrt(1-r*r)*u + r*u;e=normrnd(0*eye(n),5*(n))beta0=[4;3;2.3;1];y=X*beta0*(eye(n))'+e;
Best Answer