| Title: | Interval Estimation by Likelihoodist (LI) Compared to Frequentist (CI) |
| Version: | 0.1.1 |
| Description: | Parameter estimation via likelihood interval (LI) compared to traditional method (CI). This is the expanded version for 'LBI'- and 'wnl'-package, formulated by Kyun-Seop Bae <k@acr.kr>. |
| License: | MIT + file LICENSE |
| Encoding: | UTF-8 |
| RoxygenNote: | 7.3.3 |
| NeedsCompilation: | no |
| Packaged: | 2025-12-02 15:31:08 UTC; mkim |
| Author: | Kim Minkyu [aut, cre] |
| Maintainer: | Kim Minkyu <mkim@acr.kr> |
| Repository: | CRAN |
| Date/Publication: | 2025-12-02 15:50:02 UTC |
Interval Estimation by Likelihoodist (LI) Compared to Frequentist (CI)
Description
Parameter estimation via likelihood interval (LI) compared to traditional method (CI). This is the expanded version for 'LBI'- and 'wnl'-package, formulated by Kyun-Seop Bae <k@acr.kr>.
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 variance and variance ratio, and their likelihood function plots. Further estimating methods (especially for non-linear model functions) are upcoming.
Author(s)
Minkyu Kim <mkim@acr.kr>
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. Ruppert D, Cressie N, Carroll RJ. A Transformation/Weighting Model for Estimating Michaelis-Menten Parameters. Cornell University Technical Report 796. 1988.
3. Pawitan Y. In All Likelihood: Statistical Modelling and Inference Using Likelihood. 2001.
4. Lee MH, Bae KS. Likelihood interval for nonlinear regression. Transl Clin Pharmacol. 2023.
Examples
x <- rnorm(20, 0, 1)
y <- rnorm(40, 0, 1)
varE(x)
varEplot(x, FALSE)
varEplot(x, TRUE)
varR(x, y)
varRplot(x, y, FALSE)
varRplot(x, y, TRUE)
varE: Calculate Variance Estimate
Description
This function computes the interval estimation for a single group variance by both LI and CI method.
Usage
varE(data, conf.level = 0.95, df = 1.2, lower = 1e-08, upper = 1e+06, k)
Arguments
data |
A numeric vector functioning as a sample data. |
conf.level |
A confidence level for the CI method, also applied to the LI method. |
df |
A degree of freedom for the LI method in terms of the denominator degree of freedom of the F-test, or (n-df) of LRT, where n is the sample size of the input data. A default value of 1.2 is suggested for a single-group variance interval estimation. |
lower |
A lower bound of 'uniroot' for the lower limit (LL) calculation. 1e-08 is a default. |
upper |
An upper bound of 'uniroot' for the upper limit (UL) calculation. 1e+06 is a default. |
k |
A cutoff value for the LI method. Unless specified, the F-test is used. |
Value
Point Estimate (PE), lower limit/bound (LL/LB), upper limit/bound (UL/UB), width, sample size, cutoff value k and maximum log-likelihood function value are calculated.
Examples
x <- rnorm(20, 0, 1)
varE(x)
y <- rnorm(40, 0, 1)
varE(y)
varEplot: Plot of Variance Estimate by Likelihood Method
Description
This function plots a graph of interval estimation for a single group variance by LI method, either in the log-likelihood function or the normalized log-likelihood value.
Usage
varEplot(
data,
logLRT = FALSE,
conf.level = 0.95,
df = 1.2,
low.scale = 3,
up.scale = 5,
k
)
Arguments
data |
A numeric vector functioning as a sample data. |
logLRT |
A function type to be plotted. A default value "FALSE" refers to the log-likelihood function plot, while "TRUE" refers to the normalized log-likelihood ratio plot, or maxLL - LL. |
conf.level |
A confidence level for the CI method, also applied to the LI method. |
df |
A degree of freedom for the LI method in terms of the denominator degree of freedom of the F-test, or (n-df) of the LRT, where n is the sample size of the input data. A default value of 1.2 is suggested for a single-group variance interval estimation. |
low.scale |
A scaling factor for plotting the minimum value of the x-axis, or a parameter value. The plot starts with "PE/low.scale". 3 is a default. |
up.scale |
A scaling factor for plotting the maximum value of the x-axis, or a parameter value. The plot starts with "PE*up.scale". 5 is a default. |
k |
A cutoff value for the LI method. Unless specified, the F-test is used. |
Value
Plotted graph, either in the log-likelihood function or the normalized log-likelihood value.
Examples
x <- rnorm(20, 0, 1)
varEplot(x, FALSE)
varEplot(x, TRUE)
y <- rnorm(40, 0, 1)
varEplot(y, FALSE)
varEplot(y, TRUE)
varR: Calculate Variance Ratio Estimate
Description
This function computes the interval estimation for a two group variance ratio by both LI and CI method.
Usage
varR(
num.data,
denom.data,
conf.level = 0.95,
df = 2.4,
lower = 1e-08,
upper = 1e+06,
k
)
Arguments
num.data |
A numeric vector functioning as a sample data in a numerator position. |
denom.data |
A numeric vector functioning as a sample data in a denominator position. |
conf.level |
A confidence level for the CI method, also applied to the LI method. |
df |
A degree of freedom for the LI method in terms of the denominator degree of freedom of the F-test, or (n-df) of LRT, where n is the sum of the sample sizes of the input data. A default value of 2.4 is suggested for a two-group variance ratio interval estimation. |
lower |
A lower bound of 'uniroot' for the lower limit (LL) calculation. 1e-08 is a default. |
upper |
An upper bound of 'uniroot' for the upper limit (UL) calculation. 1e+06 is a default. |
k |
A cutoff value for the LI method. Unless specified, the F-test is used. |
Value
Point Estimate (PE), lower limit/bound (LL/LB), upper limit/bound (UL/UB), width, sample size, cutoff value k and maximum log-likelihood function value are calculated.
Examples
x <- rnorm(20, 0, 1)
y <- rnorm(40, 0, 1)
varR(x, y)
varRplot: Plot of Variance Ratio Estimate by Likelihood Method
Description
This function plots a graph of interval estimation for a two group variance ratio by LI method, either in the log-likelihood function or the normalized log-likelihood value.
Usage
varRplot(
num.data,
denom.data,
logLRT = FALSE,
conf.level = 0.95,
df = 2.4,
low.scale = 5,
up.scale = 5,
k
)
Arguments
num.data |
A numeric vector functioning as a sample data, in a numerator position. |
denom.data |
A numeric vector functioning as a sample data, in a denominator position. |
logLRT |
A function type to be plotted. A default value "FALSE" refers to the log-likelihood function plot, while "TRUE" refers to the normalized log-likelihood ratio plot, or maxLL - LL. |
conf.level |
A confidence level for the CI method, also applied to the LI method. |
df |
A degree of freedom for the LI method in terms of the denominator degree of freedom of the F-test, or (n-df) of the LRT, where n is the sample size of the input data. A default value of 2.4 is suggested for a two-group variance ratio interval estimation. |
low.scale |
A scaling factor for plotting the minimum value of the x-axis, or a parameter value. The plot starts with "PE/low.scale". 5 is a default. |
up.scale |
A scaling factor for plotting the maximum value of the x-axis, or a parameter value. The plot starts with "PE*up.scale". 5 is a default. |
k |
A cutoff value for the LI method. Unless specified, the F-test is used. |
Value
Plotted graph, either in the log-likelihood function or the normalized log-likelihood value
Examples
x <- rnorm(20, 0, 1)
y <- rnorm(40, 0, 1)
varRplot(x, y, FALSE)
varRplot(x, y, TRUE)