Commit e306cdf1 authored by Georges Kunstler's avatar Georges Kunstler
Browse files

change in figures

parent 68105094
......@@ -50,14 +50,14 @@ DF.temp2$trait <- NULL
DF.results$id2 <- paste(DF.results$id,DF.results$trait)
DF.results <- merge(DF.results,DF.temp2,by='id2',all.y=FALSE)
### save
### save
saveRDS(DF.results,file='output/lmer/DF.results.merged.rds')
DF.results <- readRDS(file='output/lmer/DF.results.merged.rds')
### DO THE ACTUAL ANALYSIS OF THE RESULTS
DF.results <- DF.results[! DF.results$model %in% c('lmer.LOGLIN.AD.Tf','lmer.LOGLIN.E.Tf','lmer.LOGLIN.R.Tf',
'lmer.LOGLIN.ER.Tf','lmer.LOGLIN.nocomp.Tf','lmer.LOGLIN.simplecomp.Tf'),] #,'lmer.LOGLIN.E','lmer.LOGLIN.R'
## DF.results <- DF.results[! DF.results$model %in% c('lmer.LOGLIN.AD.Tf','lmer.LOGLIN.E.Tf','lmer.LOGLIN.R.Tf',
## 'lmer.LOGLIN.ER.Tf','lmer.LOGLIN.nocomp.Tf','lmer.LOGLIN.simplecomp.Tf'),] #,'lmer.LOGLIN.E','lmer.LOGLIN.R'
fun.compute.criteria.diff <- function(i,DF.results,criteria.selected){
......@@ -88,8 +88,8 @@ diff.criteria.no.compet.t <- DF.results[[criteria.selected]][i] -
diff.criteria.simple.compet.t <- DF.results[[criteria.selected]][i] - DF.results[[criteria.selected]][
select.simple.compet]
R2.ratio <- (diff.criteria.simple.compet.t/diff.criteria.no.compet.t)
if(diff.criteria.no.compet.t<0) R2.ratio <- NA
if(diff.criteria.simple.compet.t<0) R2.ratio <- NA
## if(diff.criteria.no.compet.t<0) R2.ratio <- NA
## if(diff.criteria.simple.compet.t<0) R2.ratio <- NA
}else{
R2.ratio <- NA
}
......@@ -162,7 +162,7 @@ best <- DF$model[DF$id2==i][DF$delta.AIC[DF$id2==i]==0]
if(best %in% c('lmer.LOGLIN.E','lmer.LOGLIN.R')) {
d.AIC[ DF$model[DF$id2==i]=='lmer.LOGLIN.ER'] <- 0}
return(d.AIC)
}
}
d.AIC <- do.call('c',lapply(unique(DF.results$id2),FUN=f,DF.results))
DF.results$delta.AIC <- d.AIC
......@@ -560,7 +560,7 @@ models <- c('lmer.LOGLIN.ER.Tf','lmer.LOGLIN.E.Tf','lmer.LOGLIN.R.Tf','lmer.LOGL
names(models) <- c('Effect/response','Effect','Response','Absolute distance')
list.params <- list(c(Response='sumTfBn',Effect='sumTnBn'),
c('sumTnBn'),
c('sumTfBn'),
c('sumTfBn'),
c('sumTnTfBn.abs'))
pdf('figs/parameters.MAP.4models.pdf',width=9,height=9)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment