Skip to contents

pi(theta | X) is proportional to p_theta(X) pi(theta). In infinite dimensions this is not automatic: it needs the family to be dominated by a common sigma-finite measure, which is what section 1.3 establishes before anything else in the book can proceed. On a finite grid the rule is a plain normalisation, computed in logs.

Usage

Ghosalbayesruleinfinite(x, log_lik = NULL, log_prior = NULL)

Arguments

x

Grid of parameter values.

log_lik

Log-likelihood as a function of theta; a single N(theta, 1) observation at 1 when NULL.

log_prior

Log-prior as a function of theta; standard normal when NULL.

Value

List with estimate (posterior mean), posterior, grid, method.

Details

Formula: pi_i proportional to exp(log p(X | theta_i) + log pi(theta_i)).

References

Ghosal & van der Vaart (2017), Fundamentals of Nonparametric Bayesian Inference, CUP, section 1.3.

Examples

V <- c(1, 2, 3, 4, 5, 6, 7, 8)
Ghosalbayesruleinfinite(V)
#> $estimate
#> [1] 1.123316
#> 
#> $posterior
#> [1] 8.788735e-01 1.189426e-01 2.178510e-03 5.399985e-06 1.811493e-09
#> [6] 8.224167e-14 5.053103e-19 4.201800e-25
#> 
#> $grid
#> [1] 1 2 3 4 5 6 7 8
#> 
#> $method
#> [1] "Bayes rule on a grid (GvdV 2017 sec. 1.3)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"