Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

6
  • So what is your question? Your title says saving results of a nested loop, but you are saving data per last vector, fittedvaluesQRidge. Does code not work? Undesired results? Commented Dec 2, 2016 at 3:51
  • Yes i get the data in a vector. But it is like '11*21*658' long. While i want to make it come out as a matrix. For example: for t=0.1 and a=0 i get their 468 results. Then for t=0.2 and a=0 i get their next 648 and so on. I really can visualise how to set up the results to come out as a matrix. Commented Dec 2, 2016 at 10:19
  • I thought you were familiar from your last question! I see you do not use any apply functions. Sapply can bind the predictedQR vectors in a matrix. Where is a and t loop variables being used? Commented Dec 2, 2016 at 14:33
  • I really tried but i failed miserably. Well the 't' and 'a' are used inside the 'cv.hqreg' function. Commented Dec 2, 2016 at 14:54
  • Do you need a matrix or an array? You are showing more than two dimensions: 11 X 21 X 658. Commented Dec 2, 2016 at 22:10