I am running an odds ratio calculation for site methylation amongst cases and controls.
In this situation is it preferable to use a conditional or unconditional MLE? I am asking because R uses a conditional estimator while scipy uses an unconditional estimator. See here.
As a result, I am getting differences in the p-values calculated. I found an article from 1984 which suggests that conditional MLE is far superior. If this is the case, why does scipy API suggest that using unconditional MLE is much more common?
It was also asked here by gotgenes. But no answer was provided so far.
odds_extractor <- function(cpg_id,disease,control){
# Make a temporary data frame to hold just one cpg site frequency table
temp <- cpg_list[[cpg_id]][c(disease, control),]
# Get all of the a,b,c,d values
a <- as.numeric(temp[1,1])
b <- as.numeric(temp[1,2])
c <- as.numeric(temp[2,1])
d <- as.numeric(temp[2,2])
# Perform the odds ratio calculation
oddsratio(a+rts,b+rts,c+rts,d+rts)
}
...
writting[i,4] <- odds_extractor(names(cpg_list)[i],disease,control)$estimate