Resampling Columns of a Matrix
Posted: Mon Apr 01, 2013 3:06 pm
Hi,
I want to bootstrap not rows of a matrix, but cols. Since to the my knowledge Eviews does not have a command for this situation, first I transposed the matrix, then resampled. But Eviews does not exactly resample the rows of the new matrix. The code is below
matrix bootkal1 = @transpose(bootkal)
matrix bootkal2 = @resample(bootkal1)
The result is
37.78425311004244 42.12208576778759 44.65110673041997
3.487714269148301 3.544167370822096 3.741550594033354
34.85880001852675 36.60544090217692 43.9921886220723
3.573937242919356 3.490016999370026 3.471114415859684
37.78425311004244 42.12208576778759 44.65110673041997
(I summarized the results).
As it can be seen in the results, always the first and last rows of the matrix is same, so it does not exaclty resample. Although I determine the number of the bootstrap as 10000. When I do not transpose the matrix "bootkal", the code is really resampling. How I can solve this problem? Any suggestions? :eviews6:
I want to bootstrap not rows of a matrix, but cols. Since to the my knowledge Eviews does not have a command for this situation, first I transposed the matrix, then resampled. But Eviews does not exactly resample the rows of the new matrix. The code is below
matrix bootkal1 = @transpose(bootkal)
matrix bootkal2 = @resample(bootkal1)
The result is
37.78425311004244 42.12208576778759 44.65110673041997
3.487714269148301 3.544167370822096 3.741550594033354
34.85880001852675 36.60544090217692 43.9921886220723
3.573937242919356 3.490016999370026 3.471114415859684
37.78425311004244 42.12208576778759 44.65110673041997
(I summarized the results).
As it can be seen in the results, always the first and last rows of the matrix is same, so it does not exaclty resample. Although I determine the number of the bootstrap as 10000. When I do not transpose the matrix "bootkal", the code is really resampling. How I can solve this problem? Any suggestions? :eviews6: