Skip to contents

Y | x ~ Poisson(exp(f(x))) with f a finite random series. The log link keeps the rate positive without constraining the coefficients, and gradient ascent on the MAP objective recovers the log-rate; the reported error is the mean absolute deviation of the fitted f from the truth f0(x) = 1 + 0.8 cos(pi x) over a uniform grid.

Usage

Ghosalfrspoireg(n = 800, K = 3, seed = 42)

Arguments

n

Sample size.

K

Number of basis terms.

seed

Seed for the deterministic draws.

Value

List with estimate (mean absolute error of the fitted log-rate), beta, method.

Details

Formula: grad_k = sum_i (y_i - exp(min(f(x_i), 5))) phi_k(x_i), beta <- beta + step grad - decay beta.

References

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

Examples

Ghosalfrspoireg()
#> $estimate
#> [1] 0.03708307
#> 
#> $beta
#> [1]  0.98893976  0.60547045 -0.01954952
#> 
#> $method
#> [1] "series Poisson regression (GvdV 2017 sec. 10.4.4)"
#> 
#> attr(,"class")
#> [1] "morie_rich_result" "list"