Re: [R] Error propagation

2008-03-25 Thread Ben Bolker
Andrej-Nikolai Spiess uke.uni-hamburg.de> writes: > > Dear R-helpers, > > I´m in the context of writing a general function for error propagation > in R. > There are somehow a few questions I would like to ask (discuss), as my > statistical knowledge is somewhat restricted. > Below is the funct

[R] Error propagation

2008-03-25 Thread Andrej-Nikolai Spiess
Dear R-helpers, I´m in the context of writing a general function for error propagation in R. There are somehow a few questions I would like to ask (discuss), as my statistical knowledge is somewhat restricted. Below is the function I wrote, the questions are marked. Many thanks in advance. pro

Re: [R] Error propagation

2008-02-08 Thread Christian Ritz
Hi Steve, I think you need to use apply() as in the following tiny example: x <- data.frame(response = c(-121,-131,-135)) apply(x, 1, function(response){rnorm(10, mean = response, sd = rnorm(10, mean = 9.454398, sd = 1.980136))}) Christian __ R-hel

Re: [R] error propagation

2008-02-08 Thread Henrique Dallazuanna
Perhaps: sim <- apply(x, 1, function(.x)rnorm(1000, .x[2], rnorm(1000,mean= 9.454398,sd=1.980136))) On 08/02/2008, Steven Van Wilgenburg <[EMAIL PROTECTED]> wrote: > Hello, > > > I wish to examine the influence of error in variables on my analyses > via error propagation. I have a data frame (x)

[R] Error propagation

2008-02-08 Thread VanWilgenburg,Steve [Sas]
Hello, I wish to examine the influence of error in variables on my analyses via error propagation. I have a data frame (x) as follows: id response 1-121 2-131 3-125 etc. I wish to propagate errors for each row in the data frame, where error is distributed around the value of t

[R] error propagation

2008-02-08 Thread Steven Van Wilgenburg
Hello, I wish to examine the influence of error in variables on my analyses via error propagation. I have a data frame (x) as follows: id response 1-121 2-131 3-125 etc. I wish to propagate errors for each row in the data frame, where error is distributed around the value of