Skip to contents

Testa H0: theta = theta0 usando a estatistica de escore U(theta0)^2 / I(theta0) ~ qui-quadrado(1), com derivadas numericas.

Usage

rnp_teste_score(log_veross, theta0, digits = 4L)

Arguments

log_veross

Funcao escalar function(theta) ....

theta0

Valor sob a hipotese nula.

digits

Inteiro.

Value

tibble com estatistica, gl, p_valor, theta0.

Examples

set.seed(1); x <- rpois(100, 3)
ll <- function(l) sum(dpois(x, l, log = TRUE))
rnp_teste_score(ll, theta0 = 2.5)
#> # A tibble: 1 × 4
#>   estatistica    gl p_valor theta0
#>         <dbl> <int>   <dbl>  <dbl>
#> 1        9.92     1  0.0016    2.5