Skip to content
Prev 325976 / 398502 Next

Loops

Hi
How do you get result with syntax error code? 

Anyway did you give a chance to help provided by Jason? If I understand your code, you have three "k" values based on them you compute three "l" values with a differnt constant each time. Based on this you can get
[1] 6.824
[1] 7.31
[1] 8.15
[1] 3.776293e+02 1.990643e+06 1.703709e+08

then you want to get z vector in 3 steps

z <- (log(1/p)*l[1])^k[1]
z[z<=684] <-  (log(1/p)*l[2])^k[2]
z[z<=684] <-  (log(1/p)*l[3])^k[3]

you maybe want to subset also p

and you need top repeat this 1000 times probably in loop to populate resulting matrix.

Anyyway some example of data and working code would be helpful.

Regards
Petr