Displaying 3 results from an estimated 3 matches for "aeven2".
2010 Oct 13
1
(no subject)
...set.seed(180185)
nsim <- 10
mresultx <- matrix(-99, nrow=1000, ncol=nsim)
mresultb <- matrix(-99, nrow=1000, ncol=nsim)
N <- 200
I <- 5
taus <- c(0.480:0.520)
h <- c(1:20/1000)
alpha1 <- c(1:82)
aeven1 <- alpha[2 * 1:41]
aodd1 <- alpha[-2 * 1:41]
alpha2 <- c(1:40)
aeven2 <- alpha2[2 * 1:20]
#Create an object to hold results.
M <- matrix(0, ncol=82, nrow=nsim)
Mhb0 <- matrix(0, ncol=20, nrow=nsim)
Mhb1 <- matrix(0, ncol=20, nrow=nsim)
Mchb0 <- matrix(0, ncol=20, nrow=nsim)
Mchb1 <- matrix(0, ncol=20, nrow=nsim)
for (i in 1:nsim){
# make a matrix wi...
2010 Oct 13
4
loop
Dear all,
I am trying to run a loop in my codes, but the software returns an error: "subscript out of bounds"
I dont understand exactly why this is happenning. My codes are the following:
rm(list=ls()) #remove almost everything in the memory
set.seed(180185)
nsim <- 10
mresultx <- matrix(-99, nrow=1000, ncol=nsim)
mresultb <- matrix(-99, nrow=1000, ncol=nsim)
N
2010 Oct 15
0
nomianl response model
...set.seed(180185)
nsim <- 10
mresultx <- matrix(-99, nrow=1000, ncol=nsim)
mresultb <- matrix(-99, nrow=1000, ncol=nsim)
N <- 200
I <- 5
taus <- c(0.480:0.520)
h <- c(1:20/1000)
alpha1 <- c(1:82)
aeven1 <- alpha[2 * 1:41]
aodd1 <- alpha[-2 * 1:41]
alpha2 <- c(1:40)
aeven2 <- alpha2[2 * 1:20]
#Create an object to hold results.
M <- matrix(0, ncol=82, nrow=nsim)
Mhb0 <- matrix(0, ncol=20, nrow=nsim)
Mhb1 <- matrix(0, ncol=20, nrow=nsim)
Mchb0 <- matrix(0, ncol=20, nrow=nsim)
Mchb1 <- matrix(0, ncol=20, nrow=nsim)
for (i in 1:nsim){
# make a matrix wi...