I have this data set
DF:
Type Value Average SD Q.
S AA+ 3 1 30
S AA 2 1 30
S A 1 1 30
S B -2 1 30
S BB - -3 1 30
F AA+ 2 0.75 30
F AA 1 0.75 30
F A 0 0.75 30
F B -1 0.75 30
F BB - -2 0.75 30
I would like to make a probability distribution in loop by type and value like this
rnorm(n, mean = 0, sd = 1)
rnorm(DF$Q., DF$Average, DF$SD)
I have list of unique values
type_list <- unique(DF$Type)
Value_list <- unique(DF$Value)
And now I am trying to loop it
probability_distributions <- list()
for (i in 1:length(type_list)) {
for (j in 1:length(Value_list) {
pd <- rnorm(DF$Q.[i,j], DF$Average[i,j], DF$SD[i,j])
probability_distributions <- c(pd, list(probability_distributions ))
}
}
I would like to get something like this
List:
S AA+
1 -3.837712
2 -3.690301
3 -3.837331
4 -2.302341 ....
And have another 10 lists