Fareborther algorithm using CompQuadForm package in R
0
0
Entering edit mode
3.4 years ago

Hi there!! I am trying to utilize the pooled.Chi routine found in this paper "https://www.niehs.nih.gov/research/resources/software/biostatistics/scd/index.cfm" what I am trying to is to adjust a set of P-values from one phenotype using a set of values from a second phenotype, "that is what this routine is supposed to do". I am trying to adjust a total of 100 P-values in a loop so that P-value 1, would adjust P-value 2 and it would output and adjusted P-value, then move to the next pair of P-values. However, when the function Fareborother is called, it returns the same value per each pair from 1:100.

Has anyone used this package before? and if so, what should I do to get the correct output?
Below is how I call the pooled.Chi routine.

n <- c(500, 99, 99)
# vector of p-values
dat1 <- fread("psp_ad_onehundred_rown.txt")
p1 <- dat1$PSP_P
p2 <- dat1$AD_P
for (i in 3:99){
p <- c(p1[i], p2[i])
# combined p-value for the Z method
#pz <- pooled.Z(n, p, effect.signs)
#pza <- append(pza, pz)
# combined p-value for the chi-square method
pchi <- pooled.Chi(n, p)
# adjust the first p-value (0.07) given the second one (0.04)
#pcond <- conditional.Z(n[1:3], p[1:2], effect.signs[1:2])
cat(pchi)
}

Thank you

R • 445 views
ADD COMMENT
0
Entering edit mode

Without looking into the details of this, I think you need to pass the whole series of your 100 paired p-values to the function. This is because I suspect that their distributions play a role. I don't see how having two p-values without context would allow one to be used to correct the other.

ADD REPLY

Login before adding your answer.

Traffic: 2052 users visited in the last hour
Help About
FAQ
Access RSS
API
Stats

Use of this site constitutes acceptance of our User Agreement and Privacy Policy.

Powered by the version 2.3.6