Suppose I have an array named sims_add_dom
with dim(100,5,100):
sims_add_dom <- structure(list(marker = 1:10, coeff_a = c(0.1814993012, -1.2206119381,
-0.298198096, 0.1131342646, 1.2563355045, 0.7464163985, 0.0002634054,
0.1154037559, 0.3739666234, 1.8235592343), Pvalue_a = c(0.7449502,
0.001649993, 0.4299404, 0.7704995, 0.07119358, 0.1737651, 0.9996618,
0.7814851, 0.5222457, 1.616549e-05), coeff_d = c(-2.36629627,
2.54339395, 0.16246537, -0.14700687, -0.82243816, 0.9682112,
NA, -0.55876864, -2.18497032, -4.78780087), Pvalue_d = c(0.3925707,
0.00146736, 0.820999, 0.8413498, 0.7667223, 0.7268808, NA, 0.3931673,
0.2660354, 2.889129e-06)), class = "data.frame", row.names = c(NA,
-10L))
Now I want to select the rows based on certain conditions on the variables Pvalue_a
and Pvalue_d
. Suppose, if the value of the Pvalue_a < 0.05
or Pvalue_d < 0.05
, then select these rows and their associated values.
Actually, I want to know how many estimators are significant based on the condition. I have searched on google and StackOverflow but did not find a straightforward answer to my question.
I would be very grateful if someone helps me to solve this problem. Thank you for your help.
Example dataset: