Higher Order Likelihood Inference Web Applications

Higher order likelihood inference is a promising approach for analyzing small sample size data. The 'holi' package provides web applications for higher order likelihood inference. It currently supports linear, logistic, and Poisson generalized linear models through the rstar_glm() function, based on Pierce and Bellio (2017) and 'likelihoodAsy'. The package offers two main features: LA_rstar(), which launches an interactive 'shiny' application allowing users to fit models with rstar_glm() through their web browser, and sim_rstar_glm_pgsql(), which streamlines the process of launching a web-based 'shiny' simulation application that saves results to a user-created 'PostgreSQL' database.


holi

The goal of holi is to provide web applications for higher order likelihood inference.

Installation

You can install the released version of ‘holi’ from CRAN:

install.packages("holi")

You can install the development version of holi from GitHub with:

# install.packages("devtools")
devtools::install_github("mightymetrika/holi")

Example

This is a basic example which shows you how to compare the p-value from stats::glm() and the r* p-value from holi::rstar_glm() when analyzing ‘mtcars’. The holi::rstar_glm() function relies on likelihoodAsy::rstar().

library(holi)

# Fit model
rs_linear <- rstar_glm(mpg ~ wt + hp, .data = mtcars, .model = "linear")
#> get mle ....     get mle under the null.... 
#> start Monte Carlo computation 
#>   |                                                                              |                                                                      |   0%  |                                                                              |=======                                                               |  10%  |                                                                              |==============                                                        |  20%  |                                                                              |=====================                                                 |  30%  |                                                                              |============================                                          |  40%  |                                                                              |===================================                                   |  50%  |                                                                              |==========================================                            |  60%  |                                                                              |=================================================                     |  70%  |                                                                              |========================================================              |  80%  |                                                                              |===============================================================       |  90%  |                                                                              |======================================================================| 100%

# See results from stats::glm()
rs_linear$fit_glm |> summary()
#> 
#> Call:
#> stats::glm(formula = .formula, family = stats::gaussian, data = .data)
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept) 37.22727    1.59879  23.285  < 2e-16 ***
#> wt          -3.87783    0.63273  -6.129 1.12e-06 ***
#> hp          -0.03177    0.00903  -3.519  0.00145 ** 
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> (Dispersion parameter for gaussian family taken to be 6.725785)
#> 
#>     Null deviance: 1126.05  on 31  degrees of freedom
#> Residual deviance:  195.05  on 29  degrees of freedom
#> AIC: 156.65
#> 
#> Number of Fisher Scoring iterations: 2

# See r* results
rs_linear$fit_glm |> summary()
#> 
#> Call:
#> stats::glm(formula = .formula, family = stats::gaussian, data = .data)
#> 
#> Coefficients:
#>             Estimate Std. Error t value Pr(>|t|)    
#> (Intercept) 37.22727    1.59879  23.285  < 2e-16 ***
#> wt          -3.87783    0.63273  -6.129 1.12e-06 ***
#> hp          -0.03177    0.00903  -3.519  0.00145 ** 
#> ---
#> Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
#> 
#> (Dispersion parameter for gaussian family taken to be 6.725785)
#> 
#>     Null deviance: 1126.05  on 31  degrees of freedom
#> Residual deviance:  195.05  on 29  degrees of freedom
#> AIC: 156.65
#> 
#> Number of Fisher Scoring iterations: 2

In this example, the p-value for r* (5.556e-07) is smaller than the p-value for stats::glm() (1.12e-06).

References

Pierce, D. A., & Bellio, R. (2017). Modern Likelihood-Frequentist Inference. International Statistical Review / Revue Internationale de Statistique, 85(3), 519–541. doi:10.1111/insr.12232

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("holi")

0.1.1 by Mackson Ncube, 2 years ago


https://github.com/mightymetrika/holi


Report a bug at https://github.com/mightymetrika/holi/issues


Browse source code at https://github.com/cran/holi


Authors: Mackson Ncube [aut, cre] , mightymetrika , LLC [cph, fnd]


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports DT, ggplot2, likelihoodAsy, MASS, pool, RPostgres, shiny, shinythemes, sn

Suggests testthat


See at CRAN