Skip to contents

P(Y = 1 | x) = Phi(f(x)) with f a finite random series gives the same adaptive rate as the density case. The fit here is a damped gradient ascent on the logistic MAP objective (a link with matched slope), which is enough to show the posterior mean orders the covariate correctly: the fitted probability crosses one half where the truth does.

Usage

Ghosalfrsbinreg(n = 800, K = 4, seed = 42)

Arguments

n

Sample size.

K

Number of basis terms.

seed

Seed for the deterministic draws.

Value

List with estimate (deviation of the fit at x = 1/2 from one half), orders_correctly, p_low_high, method.

Details

Formula: f(x) = sum_k beta_k phi_k(x), phi_0 = 1, phi_k(x) = sqrt(2) cos(k pi x); beta <- beta + step grad - decay beta, grad_k = sum_i (y_i - p_i) phi_k(x_i).

References

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

Examples

Ghosalfrsbinreg()
#> $estimate
#> [1] 0.00123122
#> 
#> $orders_correctly
#> [1] TRUE
#> 
#> $p_low_high
#> [1] 0.2356259 0.7192859
#> 
#> $method
#> [1] "series binary regression (GvdV 2017 sec. 10.4.3)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"