Hello Everyone,
Using = Pluto 0.17.*
using Combinatorics, StatsBase
Am working with the following DF
P1 = DataFrame(Col1 = rand(1:5:100,10), Col2 = rand(1:3:150,10), Col3=rand(1:4:250,10)
and another dataframe where the rows
represent the Mean of P1.
P2 = DataFrame(Mean = [100,120,125,115,120,110,100,115,130,120]...)
I imported and stored my control and series groups
control = P2.Mean
Col1 = collect(P1[1,:])
Col2 = collect(P1[2,:])
Col3 = collect(P1[3,:])
I then concatenated and combined all observations into one array
subGroups = collect(combinations([control;Col1; Col2;Col3],3))
3 represents the number of observations (across the columns)
I calculated the mean for all my records
meanCol1 = mean(Col1)
meanCol2 = mean(Col2)
meanCol3 = mean(Col3)
I encounter an error when I attempt to
find the p-value for each record using
pVAL1 = sum([mean(i) >= meanCol1 for i in subGroups])/ length(subGroups)
pVAL2 = sum([mean(i) >= meanCol2 for i in subGroups])/length(subGroups)
pVAL3 = sum([mean(i) >= meanCol3 for i in subGroups])/length(subGroups)
The error reads:
DimensionMismatch("dimensions must match: a has dims (Base.OneTo(10),), b has dims (Base.OneTo(3),), mismatch at 1")
If you need the Stacktrace let me know.
Any suggestions?