Hello I really need help with my program in R. I have vector with nine elements and I need divide each element by first, second, ...., hundredth, element from another vector. I try this for loop but it didn't works
er=matrix(1,100)
LCZ2016=matrix(1,100)
for(i in 2:100)
for(j in 1:9)
{
{
er[i]=rnorm(1, 0, SdeLcCZ2016)
LCZ2016[i]=DEA['L'][CZ2016,][j,]/exp(er[i])
}
}
the =DEA['L'][CZ2016,] is vector with 9 elements and I need create LCZ2016 with 100 elements like this
LCZ2016[1]=DEA['L'][CZ2016,][1] //exp(er[1])
LCZ2016[2]=DEA['L'][CZ2016,][2] //exp(er[2])
.
.
.
LCZ2016[50]=DEA['L'][CZ2016,][1] //exp(er[50])
etc. Please do you have any idea ?