Title: Interval Estimation by Likelihood Method
Version: 0.1.2
Description: Currently used CI method has its limitation when the test statistics are asymmetrical (chi-square test, F-test) or the model functions are non-linear. It can be overcome by using the likelihood functions for the interval estimation. 'inteli' package now supports interval estimation for the mean, variance, variance ratio, binomial distribution, Poisson distribution, odds ratio, risk difference, relative risk and their likelihood function plots. Testing functions are also provided.
License: GPL (≥ 3)
Encoding: UTF-8
RoxygenNote: 7.3.3
Imports: graphics, stats
NeedsCompilation: no
Packaged: 2025-12-26 02:47:08 UTC; mkim
Author: Minkyu Kim [aut, cre], Kyun-Seop Bae ORCID iD [aut]
Maintainer: Minkyu Kim <mkim@acr.kr>
Repository: CRAN
Date/Publication: 2026-01-08 00:00:08 UTC

Interval Estimation by Likelihood Method

Description

Parameter estimation via likelihood interval (LI) compared to conventional method (CI).

Details

Currently used CI method has its limitation when the test statistics are asymmetrical (chi-square test, F-test) or the model functions are non-linear. It can be overcome by using the likelihood functions for the interval estimation. 'inteli' package now supports interval estimation for the mean, variance, variance ratio, binomial distribution, Poisson distribution, odds ratio, risk difference, relative risk and their likelihood function plots. Testing functions are also provided.

Author(s)

Maintainer: Minkyu Kim mkim@acr.kr

Authors:

References

  1. Wilks SS. The Large-sample Distribution of the Likelihood Ratio for Testing Composite Hypotheses. Ann Math Stat. 1938;9(1):60-62.

  2. Edwards AWF. Likelihood. 1972.

  3. Fisher RA. Statistical Methods and Scientific Inference. 3e. 1973.

  4. Bates DM, Watts DG. Nonlinear Regression Analysis and its Application. 1988.

  5. Ruppert D, Cressie N, Carroll RJ. A Transformation/Weighting Model for Estimating Michaelis-Menten Parameters. Cornell University Technical Report 796. 1988.

  6. Royall R. Statistical Evidence. 1997.

  7. Pinheiro JC, Bates DM. Mixed Effects Models in S and S-PLUS. 2000.

  8. Pawitan Y. In All Likelihood: Statistical Modelling and Inference Using Likelihood. 2001.

  9. Lehmann EL. Fisher, Nayman, and the Creation of Classical Statistics. 2011.

  10. Rohde CA. Introductory Statistical Inference with the Likelihood Function. 2014.

  11. Held L, Bove DS. Likelihood and Bayesian Inference. 2020.

  12. Lee MH, Bae KS. Likelihood interval for nonlinear regression. 2023.


Likelihood Interval for Probability of Single Sample from Binomial Distribution

Description

Likelihood interval for probability of single sample assuming binomial distribution. Likelihood function plot is also shown. For faster calculation speed, plot option '0' is recommended.

Arguments

event

number of events from observed data; a numeric vector

total

total number of trials from observed data; a numeric vector

plot

likelihood function plots by LI; default is "all"

conf.level

confidence level for the interval estimation

eps

machine epsilon value; default is 1e-08

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

LI

estimated interval of probability (y/n) by LI

CI

estimated interval of probability (y/n) by CI

plot

likelihood-related plots

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  lib(8, 10)

Likelihood Interval for Mean of Single Sample from Normal Distribution

Description

Likelihood interval for mean of single sample assuming normal distribution. Likelihood function plot is also shown. Likelihood function plot is also shown. For faster calculation speed, plot option '0' is recommended.

Arguments

data

a numeric vector of data values; mandatory

plot

likelihood function plots by LI; default is "all". 'OBJ', 'O1', '1' is objective function plot; 'OFV', 'O2', '2' is log likelihood function plot; 'LRT', 'O3', '3' is log LRT function plot.

conf.level

confidence level for the interval estimation

df

degree of freedom for likelihood interval; default is 1

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

LI

estimated interval of mean by LI

CI

estimated interval of mean by CI

plot

likelihood-related plots

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  lim(rnorm(20, 0, 1))

Likelihood Interval for Odds Ratio of 2-by-2 Contingency Table.

Description

Likelihood interval for odds ratio of 2-by-2 contingency table. Likelihood function plot is also shown. For faster calculation speed, plot option '0' is recommended.

Arguments

exposure.O_event.O

a numeric vector of exposure (+) and event (+), 'a' of 2-by-2 table; mandatory

exposure.O_TOTAL

a numeric vector of exposure (+), 'a' + 'b' of 2-by-2 table; mandatory

exposure.X_event.O

a numeric vector of exposure (-) and event (-), 'c' of 2-by-2 table; mandatory

exposure.X_TOTAL

a numeric vector of exposure (-), 'c' + 'd' of 2-by-2 table; mandatory

plot

likelihood function plots by LI; default is "all". 'OBJ', 'O1', '1' is objective function plot; 'OFV', 'O2', '2' is log likelihood function plot; 'LRT', 'O3', '3' is log LRT function plot.

conf.level

confidence level for the interval estimation

eps

machine epsilon value; default is 1e-08

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

contin_2x2

2-by-2 contingency table

LI

estimated interval of odds ratio by LI

CI

estimated interval of odds ratio by CI

plot

likelihood-related plots

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  liod(21, 43, 16, 67)
  liod(21, 43, 16, 67, plot = 0) # faster calculation

Likelihood Interval for Poisson Mean of Single Sample from Poisson Distribution

Description

Likelihood interval for Poisson mean of single sample assuming Poisson distribution. Likelihood function plot is also shown. For faster calculation speed, plot option '0' is recommended.

Arguments

event

number of events; a numeric vector

unit.time

unit time for Poisson mean; default is 1

data.size

sample size. If not specified, size is assumed to be 1. For LI being more precise, sample size must be considered.

conf.level

confidence level for the interval estimation

eps

machine epsilon value; default is 1e-08

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

LI

estimated interval of Poisson mean by LI

CI

estimated interval of Poisson mean by CI

plot

likelihood-related plots

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  lipois(8)
  lipois(event = 8, unit.time = 3)
  lipois(event = 8, unit.time = 3, data.size = 6)

Likelihood Interval for Variance Ratio of Two Samples from Normal Distribution

Description

Likelihood interval for variance ratio of two samples assuming normal distribution. Likelihood function plot is also shown. For faster calculation speed, plot option '0' is recommended. Sample size is not allocated.

Arguments

num.data

a numeric vector of data values, variance value at the numerator position; mandatory

denom.data

a numeric vector of data values, variance value at the denominator position; mandatory

plot

likelihood function plots by LI; default is "all". 'OBJ', 'O1', '1' is objective function plot; 'OFV', 'O2', '2' is log likelihood function plot; 'LRT', 'O3', '3' is log LRT function plot.

conf.level

confidence level for the interval estimation

df

degree of freedom for likelihood interval; default is 2.4

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

LI

estimated interval of variance ratio by LI

LI.sdR

estimated interval of standard deviation ratio by LI

CI

estimated interval of variance by CI

plot

likelihood-related plots

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  lir(rnorm(30, 0, 1), rnorm(20, 0, 1))

Likelihood Interval for Risk Difference of 2-by-2 Contingency Table.

Description

Likelihood interval for risk difference of 2-by-2 contingency table. Likelihood function plot is also shown. For faster calculation speed, plot option '0' is recommended.

Arguments

exposure.O_event.O

a numeric vector of exposure (+) and event (+), 'a' of 2-by-2 table; mandatory

exposure.O_TOTAL

a numeric vector of exposure (+), 'a' + 'b' of 2-by-2 table; mandatory

exposure.X_event.O

a numeric vector of exposure (-) and event (-), 'c' of 2-by-2 table; mandatory

exposure.X_TOTAL

a numeric vector of exposure (-), 'c' + 'd' of 2-by-2 table; mandatory

plot

likelihood function plots by LI; default is "all". 'OBJ', 'O1', '1' is objective function plot; 'OFV', 'O2', '2' is log likelihood function plot; 'LRT', 'O3', '3' is log LRT function plot.

conf.level

confidence level for the interval estimation

eps

machine epsilon value; default is 1e-08

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

contin_2x2

2-by-2 contingency table

LI

estimated interval of risk difference by LI

CI

estimated interval of risk difference by CI

plot

likelihood-related plots

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  lird(21, 43, 16, 67)
  lird(21, 43, 16, 67, plot = 0) # faster calculation

Likelihood Interval for Relative Risk of 2-by-2 Contingency Table.

Description

Likelihood interval for relative risk of 2-by-2 contingency table. Likelihood function plot is also shown. For faster calculation speed, plot option '0' is recommended.

Arguments

exposure.O_event.O

a numeric vector of exposure (+) and event (+), 'a' of 2-by-2 table; mandatory

exposure.O_TOTAL

a numeric vector of exposure (+), 'a' + 'b' of 2-by-2 table; mandatory

exposure.X_event.O

a numeric vector of exposure (-) and event (-), 'c' of 2-by-2 table; mandatory

exposure.X_TOTAL

a numeric vector of exposure (-), 'c' + 'd' of 2-by-2 table; mandatory

plot

likelihood function plots by LI; default is "all". 'OBJ', 'O1', '1' is objective function plot; 'OFV', 'O2', '2' is log likelihood function plot; 'LRT', 'O3', '3' is log LRT function plot.

conf.level

confidence level for the interval estimation

eps

machine epsilon value; default is 1e-08

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

contin_2x2

2-by-2 contingency table

LI

estimated interval of relative risk by LI

CI

estimated interval of relative risk by CI

plot

likelihood-related plots

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  lirr(21, 43, 16, 67)
  lirr(21, 43, 16, 67, plot = 0) # faster calculation

Likelihood Interval for Variance of Single Sample from Normal Distribution

Description

Likelihood interval for variance of single sample assuming normal distribution. Likelihood function plot is also shown. For faster calculation speed, plot option '0' is recommended.

Arguments

data

a numeric vector of data values; mandatory

plot

likelihood function plots by LI; default is "all". 'OBJ', 'O1', '1' is objective function plot; 'OFV', 'O2', '2' is log likelihood function plot; 'LRT', 'O3', '3' is log LRT function plot.

conf.level

confidence level for the interval estimation

df

degree of freedom for likelihood interval; default is 1.2

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

LI

estimated interval of variance by LI

LI.sd

estimated interval of standard deviation by LI

CI

estimated interval of variance by CI

plot

likelihood-related plots

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  liv(rnorm(30, 0, 1))

Testing Function for Probability from Binomial Distribution

Description

Testing function for variance ratio of two samples assuming normal distribution by LI method. O2 type likelihood function plot is also shown.

Arguments

event

number of events from observed data; a numeric vector

total

total number of trials from observed data; a numeric vector

test.val

a numeric vector of testing value for probability

conf.level

confidence level for the interval estimation

eps

machine epsilon value; default is 1e-08

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

interval

estimated interval by LI and CI.

stat

statistical values, such as p-value and likelihood ratio

verdict

estimation result as a sentence

plot

log likelihood function plot (O2 type)

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  qlib(8, 13, 0.7)
  qlib(3, 10, 0.8)

Testing Function for Mean Difference of Two Samples from Normal Distribution by LI Method

Description

Testing function for mean difference of two samples assuming normal distribution by LI method. O2 type likelihood function plot is also shown.

Arguments

set.a

a numeric vector of former data values; mandatory

set.b

a numeric vector of latter data values; mandatory

conf.level

confidence level for the interval estimation

df

degree of freedom for likelihood interval; default is 1

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

interval

estimated interval by LI and CI. PE is mean(set.a) - mean(set.b).

stat

statistical values, such as p-value and likelihood ratio

verdict

estimation result as a sentence

plot

log likelihood function plot (O2 type)

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  x <- rnorm(30, 0, 1)
  y <- rnorm(20, 0, 1)
  qlim(x, y)

Testing Function for Poisson Mean from Poisson Distribution

Description

Testing function for Poisson mean of single sample assuming Poisson distribution by LI method. O2 type likelihood function plot is also shown.

Arguments

data

a numeric vector of data values; mandatory

test.val

a numeric vector of testing value for Poisson mean; mandatory

conf.level

confidence level for the interval estimation

eps

machine epsilon value; default is 1e-08

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

interval

estimated interval by LI and CI.

stat

statistical values, such as p-value and likelihood ratio

verdict

estimation result as a sentence

plot

log likelihood function plot (O2 type)

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  qlipois(rnorm(20, 1, 1), 1)

Testing Function for Variance Ratio of Two Samples from Normal Distribution

Description

Testing function for variance ratio of two samples assuming normal distribution by LI method. O2 type likelihood function plot is also shown. Smaller sample is allocated to be in the nominator for more accurate and precise estimation.

Arguments

set.a

a numeric vector of data values; mandatory, pre-allocation

set.b

a numeric vector of data values; mandatory, pre-allocation

conf.level

confidence level for the interval estimation

df

degree of freedom for likelihood interval; default is 2.4

k

cutoff value for likelihood interval. If not specified, F-test is used.

Value

demo

basic demographics of data

interval

estimated interval by LI and CI.

stat

statistical values, such as p-value and likelihood ratio

verdict

estimation result as a sentence

plot

log likelihood function plot (O2 type)

Author(s)

Kyun-Seop Bae <k@acr.kr>, Minkyu Kim <mkim@acr.kr>

Examples

  x <- rnorm(30, 0, 1)
  y <- rnorm(20, 0, 1)
  qliv(x, y) # x placed in the denominator