-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
ottiP
committed
Jan 19, 2022
1 parent
128ab25
commit 311459b
Showing
1 changed file
with
30 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
compute_AIC <- function(ll,p){ | ||
|
||
AIC <- 2*p+2*ll | ||
return(AIC) | ||
|
||
} | ||
|
||
result1<- readRDS("../Results/result100_Jul_nointerA.rds") | ||
min_ll1 <- sapply(result1,'[[','minimum') | ||
parms1 <- sapply(result1,'[[','estimate') | ||
p1 <- nrow(parms1) | ||
AIC1 <- compute_AIC(min_ll1,p1) | ||
|
||
result2<- readRDS("../Results/result100_Jul_allinter_TestA.rds") | ||
min_ll2 <- sapply(result2,'[[','minimum') | ||
parms2 <- sapply(result2,'[[','estimate') | ||
p2 <- nrow(parms2) | ||
AIC2 <- compute_AIC(min_ll2,p2) | ||
|
||
|
||
|
||
|
||
pdf("hist_12.pdf") | ||
hist(AIC1-AIC2, col="gray", xlab="AIC difference",ylab="",main=paste("AIC difference between model 1 and model 2")) | ||
dev.off() | ||
|
||
pdf("hist_13.pdf") | ||
hist(AIC2-AIC3, col="gray", xlab="AIC difference",ylab="",main=paste("AIC difference between model 2 and model 3")) | ||
dev.off() | ||
|