I don't know how to transform below statement into MAT LAB code? I hope that somebody can guide me to do this. Given that n=500 and p = 1000. as nxp matrix. y= B * X + c is linear regression model.

  • The design matrix has i.i.d rows and AR(1) columns with autocorrelation coefficient specified by the x-axes of the plots, and marginally each Xj ~N(0,1/n).
  • y comes from a binomial linear model with logit link function with 60 nonzero coefficients of magnitude 3.5 and random sign.
  • y comes from a gaussian linear model with B and the noise variance randomly choosen.how to write this in matlab code?
  • the nonzero entries of B are Gaussian with mean zero and standard deviation given on the x-axis(magnitude 3, 5 ,8). the expected number of nonzero coefficient is 60 and the expected variance of the noise is 1.
  • I have found one may possible way to do like below.

    X = mvnrnd(mu, Sigma, n) y = X * B + sigma .* randn(n,1)

    But i don't know this is wrong or right according to my questions 1, 2,3 and 4. if it is right, how to calculate B? what is AR(1) columns with auto-correlation coefficient?

    More Mahammad Humayoo's questions See All
    Similar questions and discussions