Skip to content

Commit da310cd

Browse files
committed
more exact BIC calculation
can be substantial for models with many parameters or datasets with small numbers of datapoints
1 parent 97611be commit da310cd

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

MemModelComparison/ModelComparison_AIC_BIC.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,6 @@
7777
k = length(models{md}.upperbound);
7878
AIC(md) = -2*logLike(md) + 2*k;
7979
AICc(md)= -2*logLike(md) + 2*k * (dataLen / (dataLen - k - 1));
80-
BIC(md) = -2*logLike(md) + log(dataLen)*k;
80+
BIC(md) = -2*logLike(md) + (log(dataLen)+log(2*pi))*k;
8181
end
8282
end

0 commit comments

Comments
 (0)