Skip to content

Commit 9dd53c2

Browse files
author
Bojan Nikolic
committed
Add output of model mean an error for the prediction from nested sampling
1 parent 3ad2174 commit 9dd53c2

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

R/output.R

+4
Original file line numberDiff line numberDiff line change
@@ -130,4 +130,8 @@ nested.mhist <- function(r, m, x)
130130
w,
131131
main=paste("Probability distribution of model at ", x),
132132
breaks="FD")
133+
134+
x1 <- sum(pw*w)/sum(w)
135+
x2 <- sum((pw-x1)**2*w)/sum(w)
136+
print(paste("*** Model prediction and error: ", x1, " +/- ", x2))
133137
}

0 commit comments

Comments
 (0)