At 1:38 PM + 1/22/06, Laura Quinn wrote:
I'm wanting to create a series of near-identical matrices via the addition
of white noise to my starting matrix. Is there a function within R which
will allow me to do this?
Thank you
If the starting matrix is symmetric, see mvrnorm in the MASS
I'm wanting to create a series of near-identical matrices via the addition
of white noise to my starting matrix. Is there a function within R which
will allow me to do this?
Thank you
Laura Quinn
Institute of Atmospheric Science
School of Earth and Environment
University of Leeds
Leeds
LS2 9JT
Is this what you want by adding a random number to the values?
x - matrix(1:9, ncol=3)
x
[,1] [,2] [,3]
[1,]147
[2,]258
[3,]369
x + runif(9, -.1, .1)
[,1] [,2] [,3]
[1,] 0.9577315 3.927673 6.953332
[2,] 2.0530684 5.072495 8.076258
[3,]
On 22-Jan-06 Laura Quinn wrote:
I'm wanting to create a series of near-identical matrices
via the addition of white noise to my starting matrix.
Is there a function within R which will allow me to do this?
Thank you
Laura Quinn
The short ansdwer is: Yes, just do it as you descibe!
For