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*

18
  • I dont think this updates each run the matrix. Like run 1: 361 rows, then run 2 362 rows, run 3 363 rows and so on. I used the print(dim(dataR)) and i got that dataR was now a matrix 1x15. Using rbind(dataR,TESTSET[i,] i think will work. Also I think you need to add a ) at the end of the whole code to close the sapply function. Commented Dec 3, 2016 at 13:16
  • Also, everytime the code goes to run the cv.hqreg function R just crashes. I know it does crash cause when cv.hqreg runs the function prints at which cross validation you are. Commented Dec 3, 2016 at 13:26
  • Ok after some pc change the code run. The only issue is that it doesn't update the dataR. Both rbind(dataR,TESTSET[1:i,] and rbind(dataR,TESTSET[i,]) don't update it. The first gives a dim = 1008x15 and the latter a dim = 362x15 in each run. Commented Dec 3, 2016 at 14:04
  • Function never returns dataR, but temporarily updates it in sapply to calculate the predictdQR which I though was the main focus here. Did you not retreive desired results of predicted values matrix? Have dataR updated in a separate for loop. Now dataR has TRAINSET to a rbind call. See edit. Commented Dec 3, 2016 at 15:07
  • Sadly rbind(dataR,TESTSET[1:i,] for each run gives that dataR is 362 rows. It doesn;t seem to update the matrix which is weird given that we rbind. Same results for rbind(dataR,TESTSET[i,] but here we have straight 1008 rows. I don't understand why. Commented Dec 3, 2016 at 22:35