Displaying 2 results from an estimated 2 matches for "simrun".
Did you mean:
simfun
2006 Jun 27
2
Random numbers negatively correlated?
...l, indicating negative correlation between the random numbers.
See below the code and the results.
Did I do something wrong or are the numbers in
fact negatively correlated? (A type I error is quite unlikely with a
p-value below 2.2e-16.)
Best,
Christian
set.seed(123456)
n <- 100
p <- 0.5
simruns <- 10000
est <- est11 <- numeric(0)
for (i in 1:simruns){
# if (i/100==round(i/100)) print(i)
x <- rbinom(n,1,p)
est[i] <- mean(x)
x11 <- 3*x[2:n]-x[1:(n-1)]
est11[i] <- sum(x11==2)/sum(x11==2 | x11==(-1))
# x11==(-1): 0 follows 1, x11==2: 1 follows...
2009 May 02
2
Problems producing a simple plot
Dear R Users,
I have a data frame of the nature:
> head(aggregate_1986)
Latitude Mean Annual Simulated Runoff per 1? Latitudinal Band
1 -55 574.09287
2 -54 247.23078
3 -53 103.40756
4 -52 86.99991
5