Title: | Profile Likelihood for a Parameter in Commonly Used Statistical Models |
---|---|
Description: | Provides profile likelihoods for a parameter of interest in commonly used statistical models. The models include linear models, generalized linear models, proportional odds models, linear mixed-effects models, and linear models for longitudinal responses fitted by generalized least squares. The package also provides plots for normalized profile likelihoods as well as the maximum profile likelihood estimates and the kth likelihood support intervals. |
Authors: | Leena Choi [aut, cre] |
Maintainer: | Leena Choi <[email protected]> |
License: | GPL (>= 3) |
Version: | 1.3 |
Built: | 2025-02-15 04:09:09 UTC |
Source: | https://github.com/choileena/profilelikelihood |
This package provides profile likelihoods for a parameter of interest in commonly used statistical models. The models include linear models, generalized linear models, proportional odds models, linear mixed-effects models, and linear models for longitudinal responses fitted by generalized least squares. The package also provides plots for normalized profile likelihoods as well as the maximum profile likelihood estimates and the k
th likelihood support intervals (Royall, 1997).
Use profilelike.lm
, profilelike.glm
, profilelike.polr
, profilelike.gls
and profilelike.lme
to obtain profile likelihoods and normalized profile likelihoods, and plot the normalized profile likelihoods using profilelike.plot
.
Use profilelike.summary
to obtain the maximum profile likelihood estimate and the k
th likelihood support intervals.
Leena Choi <[email protected]>
Maintainer: Leena Choi <[email protected]>
Royall, Richard M. (1997). Statistical Evidence: A Likelihood Paradiam. Chapman & Hall/CRC.
Pawitan, Yudi (2001). In All Likelihood: Statistical Modelling and Inference Using Likelihood. Oxford University Press.
profilelike.lm
, profilelike.glm
, profilelike.polr
, profilelike.gls
, profilelike.lme
, profilelike.plot
, profilelike.summary
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- c(rep(0,10), rep(1,10)) weight <- c(ctl, trt) dd <- data.frame(group=group, weight=weight) xx <- profilelike.lm(formula = weight ~ 1, data=dd, profile.theta="group", lo.theta=-2, hi.theta=1, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- c(rep(0,10), rep(1,10)) weight <- c(ctl, trt) dd <- data.frame(group=group, weight=weight) xx <- profilelike.lm(formula = weight ~ 1, data=dd, profile.theta="group", lo.theta=-2, hi.theta=1, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
This data is used to illustrate how to obtain values for a profile likelihood of a parameter of interest in a generalized linear model.
data(dataglm)
data(dataglm)
A data frame with 100 observations on the following 5 variables.
id
a numeric vector; unique identification number
y
a numeric vector; binary outcome variable
x1
a numeric vector; covariate
x2
a numeric vector; covariate
group
a numeric vector; covariate and a parameter of interest
This data is used to illustrate how to obtain values for a profile likelihood of a parameter of interest in a logistic regression model. A parameter of interest is group
indicator variable, y
is a binary outcome, and x1
and x2
are covariates in a logistic regression model.
data(dataglm) xx <- profilelike.glm(y ~ x1 + x2, data=dataglm, profile.theta="group", family=binomial(link="logit"), length=500, round=2) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
data(dataglm) xx <- profilelike.glm(y ~ x1 + x2, data=dataglm, profile.theta="group", family=binomial(link="logit"), length=500, round=2) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
This data is used to illustrate how to obtain values for a profile likelihood of a parameter of interest in a proportional odds model.
data(datapolr)
data(datapolr)
A data frame with 66 observations on the following 5 variables.
id
a numeric vector; unique identification number
y
a numeric vector; ordinal outcome variable; should be defined as a factor
x1
a numeric vector; covariate
x2
a numeric vector; covariate
group
a numeric vector; covariate and a parameter of interest
This data is used to illustrate how to obtain values for a profile likelihood of a parameter of interest in a proportional odds model. A parameter of interest is group
indicator variable, y
is an ordinal outcome, and x1
and x2
are covariates in a proportional odds model.
data(datapolr) datapolr$y <- as.factor(datapolr$y) xx <- profilelike.polr(y ~ x1 + x2, data=datapolr, profile.theta="group", method="logistic", lo.theta=-2, hi.theta=2.5, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
data(datapolr) datapolr$y <- as.factor(datapolr$y) xx <- profilelike.polr(y ~ x1 + x2, data=datapolr, profile.theta="group", method="logistic", lo.theta=-2, hi.theta=2.5, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
This function provides p-values based on likelihood ratio (LR) statistics for 2 x 2 tables.
LR.pvalue(y1, y2, n1, n2, interval=0.01)
LR.pvalue(y1, y2, n1, n2, interval=0.01)
y1 |
the number of success for treatment 1. |
y2 |
the number of success for treatment 2. |
n1 |
the sample size for treatment 1. |
n2 |
the sample size for treatment 2. |
interval |
grid for evaluating a parameter of interest to obtain values for likelihoods. The default is 0.01. |
This function provides p-values based on the profile and conditional likelihood ratio (LR) statistics for 2 x 2 tables.
The function also provides the profile and conditional likelihood support intervals (k
=6.8) corresponding to a 95% confidence interval based on a normal approximation. For comparison purpose, p-values from Pearson's Chi-squared test, Fisher's exact test and Pearson's Chi-squared test with continuity correction are also provided.
mle.lor.uncond |
the maximum likelihood estimate for log odds ratio. |
mle.lor.cond |
the maximum conditional likelihood estimate for log odds ratio. |
LI.norm.profile |
profile likelihood support interval ( |
LI.norm.cond |
conditional likelihood support interval ( |
LR.profile |
profile likelihood ratio. |
LR.cond |
conditional likelihood ratio. |
Pvalue.LR.profile |
p-value based on the profile LR statistic. |
Pvalue.LR.cond |
p-value based on the conditional LR statistic. |
Pvalue.chisq.test |
p-value from Pearson's Chi-squared test. |
Pvalue.fisher.test |
p-value from Fisher's exact test. |
Pvalue.chisq.cont.correction |
p-value from Pearson's Chi-squared test with continuity correction. |
Likelihood intervals, LRs and the corresonding p-values are not reliable with empty cells (y1=0 or y2=0) in 2 x 2 tables.
P-values from Pearson's Chi-squared test, Fisher's exact test and Pearson's Chi-squared test with continuity correction are provided only for comparison purpose. For more options, use chisq.test
and fisher.test
for these tests.
Leena Choi <[email protected]>
profilelike.plot
, profilelike.summary
, profilelike.glm
(fit <- LR.pvalue(y1=20, y2=30, n1=50, n2=50, interval=0.01))
(fit <- LR.pvalue(y1=20, y2=30, n1=50, n2=50, interval=0.01))
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a generalized linear model.
profilelike.glm(formula, data, profile.theta, family = stats::gaussian, offset.glm = NULL, lo.theta = NULL, hi.theta = NULL, length = 300, round = 2, subset = NULL, weights = NULL, offset = NULL, ...)
profilelike.glm(formula, data, profile.theta, family = stats::gaussian, offset.glm = NULL, lo.theta = NULL, hi.theta = NULL, length = 300, round = 2, subset = NULL, weights = NULL, offset = NULL, ...)
formula |
see corresponding documentation in |
data |
a data frame. See corresponding documentation in |
profile.theta |
a parameter of interest, theta; must be a numeric variable. |
family |
see corresponding documentation in |
offset.glm |
same usage as offset in |
lo.theta |
lower bound for a parameter of interest to obtain values for a profile likelihood. |
hi.theta |
upper bound for a parameter of interest to obtain values for a profile likelihood. |
length |
length of numerical grid values for a parameter of interest to obtain values for a profile likelihood. |
round |
the number of decimal places for |
subset |
should not be provided. |
weights |
should not be provided. |
offset |
should not be provided. Instead use offset.glm. |
... |
further arguments passed to or from other methods. |
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a generalized linear model. Users must define a parameter of interest in a generalized linear model. This function can be used for generalized linear models comparable with the glm
function. However, arguments weights, subset, and offset should not be provided. An argument offset in glm
function can be provided using offset.glm. A normalized profile likelihood is obtained by a profile likelihood being divided by the maximum value of the profile likelihood so that a normalized profile likelihood ranges from 0 to 1.
theta |
numerical grid values for a parameter of interest in a specified range (between lower and upper bounds). |
profile.lik |
numerical values for a profile likelihood corresponding to theta in a specified range (between lower and upper bounds). |
profile.lik.norm |
numerical values for a normalized profile likelihood ranging from 0 to 1. |
Arguments weights, subset, and offset in the glm
function are not comparable.
Missing values should be removed.
Leena Choi <[email protected]>
profilelike.plot
, profilelike.summary
, profilelike.lm
, profilelike.polr
, profilelike.gls
, profilelike.lme
, glm
data(dataglm) xx <- profilelike.glm(y ~ x1 + x2, data=dataglm, profile.theta="group", family=binomial(link="logit"), length=500, round=2) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
data(dataglm) xx <- profilelike.glm(y ~ x1 + x2, data=dataglm, profile.theta="group", family=binomial(link="logit"), length=500, round=2) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a linear model for longitudinal responses fitted by generalized least squares.
profilelike.gls(formula, data, correlation = NULL, subject, profile.theta, method = "ML", lo.theta, hi.theta, length = 300, round = 2, subset = NULL, weights = NULL, ...)
profilelike.gls(formula, data, correlation = NULL, subject, profile.theta, method = "ML", lo.theta, hi.theta, length = 300, round = 2, subset = NULL, weights = NULL, ...)
formula |
see corresponding documentation in |
data |
a data frame. See corresponding documentation in |
correlation |
see corresponding documentation in |
subject |
see corresponding documentation in |
profile.theta |
a parameter of interest, theta; must be a numeric variable. |
method |
see corresponding documentation in |
lo.theta |
lower bound for a parameter of interest to obtain values for a profile likelihood. |
hi.theta |
upper bound for a parameter of interest to obtain values for a profile likelihood. |
length |
length of numerical grid values for a parameter of interest to obtain values for a profile likelihood. |
round |
the number of decimal places for |
subset |
should not be provided. |
weights |
should not be provided. |
... |
further arguments passed to or from other methods. |
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a linear model for longitudinal responses fitted by generalized least squares. Users must define a parameter of interest in the model. This function can be used for models for longitudinal responses comparable with the gls
function. However, arguments weights and subset should not be provided. A normalized profile likelihood is obtained by a profile likelihood being divided by the maximum value of the profile likelihood so that a normalized profile likelihood ranges from 0 to 1.
theta |
numerical grid values for a parameter of interest in a specified range (between lower and upper bounds). |
profile.lik |
numerical values for a profile likelihood corresponding to theta in a specified range (between lower and upper bounds). |
profile.lik.norm |
numerical values for a normalized profile likelihood ranging from 0 to 1. |
Arguments weights and subset in the gls
function are not comparable.
Missing values should be removed.
Leena Choi <[email protected]>
profilelike.plot
, profilelike.summary
, profilelike.lm
, profilelike.glm
, profilelike.polr
, profilelike.lme
, gls
data(Gasoline, package = "nlme") xx <- profilelike.gls(formula=yield ~ endpoint, correlation=nlme::corAR1(form = ~ 1 | id), data=Gasoline, subject="Sample", profile.theta="vapor", method="ML", lo.theta=1, hi.theta=5, length=500, round=2) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=4)
data(Gasoline, package = "nlme") xx <- profilelike.gls(formula=yield ~ endpoint, correlation=nlme::corAR1(form = ~ 1 | id), data=Gasoline, subject="Sample", profile.theta="vapor", method="ML", lo.theta=1, hi.theta=5, length=500, round=2) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=4)
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a linear model.
profilelike.lm(formula, data, profile.theta, lo.theta = NULL, hi.theta = NULL, length = 300, round = 2, subset = NULL, weights = NULL, offset = NULL, ...)
profilelike.lm(formula, data, profile.theta, lo.theta = NULL, hi.theta = NULL, length = 300, round = 2, subset = NULL, weights = NULL, offset = NULL, ...)
formula |
see corresponding documentation in |
data |
a data frame. See corresponding documentation in |
profile.theta |
a parameter of interest, theta; must be a numeric variable. |
lo.theta |
lower bound for a parameter of interest to obtain values for a profile likelihood. |
hi.theta |
upper bound for a parameter of interest to obtain values for a profile likelihood. |
length |
length of numerical grid values for a parameter of interest to obtain values for a profile likelihood. |
round |
the number of decimal places for |
subset |
should not be provided. |
weights |
should not be provided. |
offset |
should not be provided. |
... |
further arguments passed to or from other methods. |
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a linear model. Users must define a parameter of interest in a linear model. This function can be used for linear models comparable with the lm
function. However, arguments weights, subset, and offset should not be provided. A normalized profile likelihood is obtained by a profile likelihood being divided by the maximum value of the profile likelihood so that a normalized profile likelihood ranges from 0 to 1.
theta |
numerical grid values for a parameter of interest in a specified range (between lower and upper bounds). |
profile.lik |
numerical values for a profile likelihood corresponding to theta in a specified range (between lower and upper bounds). |
profile.lik.norm |
numerical values for a normalized profile likelihood ranging from 0 to 1. |
Arguments weights, subset, and offset in the lm
function are not comparable.
Missing values should be removed.
Leena Choi <[email protected]>
profilelike.plot
, profilelike.summary
, profilelike.glm
, profilelike.polr
, profilelike.gls
, profilelike.lme
, lm
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- c(rep(0,10), rep(1,10)) weight <- c(ctl, trt) dd <- data.frame(group=group, weight=weight) xx <- profilelike.lm(formula = weight ~ 1, data=dd, profile.theta="group", lo.theta=-2, hi.theta=1, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- c(rep(0,10), rep(1,10)) weight <- c(ctl, trt) dd <- data.frame(group=group, weight=weight) xx <- profilelike.lm(formula = weight ~ 1, data=dd, profile.theta="group", lo.theta=-2, hi.theta=1, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a linear mixed-effects model.
profilelike.lme(formula, data, subject, random, correlation = NULL, profile.theta, method = "ML", lo.theta, hi.theta, length = 300, round = 2, subset = NULL, weights = NULL, ...)
profilelike.lme(formula, data, subject, random, correlation = NULL, profile.theta, method = "ML", lo.theta, hi.theta, length = 300, round = 2, subset = NULL, weights = NULL, ...)
formula |
see corresponding documentation in |
data |
a data frame. See corresponding documentation in |
subject |
see corresponding documentation in |
random |
see corresponding documentation in |
correlation |
see corresponding documentation in |
profile.theta |
a parameter of interest, theta; must be a numeric variable. |
method |
see corresponding documentation in |
lo.theta |
lower bound for a parameter of interest to obtain values for a profile likelihood. |
hi.theta |
upper bound for a parameter of interest to obtain values for a profile likelihood. |
length |
length of numerical grid values for a parameter of interest to obtain values for a profile likelihood. |
round |
the number of decimal places for |
subset |
should not be provided. |
weights |
should not be provided. |
... |
further arguments passed to or from other methods. |
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a linear mixed-effects model. Users must define a parameter of interest in a linear mixed-effects model. This function can be used for models comparable with the lme
function. However, arguments weights and subset should not be provided. A normalized profile likelihood is obtained by a profile likelihood being divided by the maximum value of the profile likelihood so that a normalized profile likelihood ranges from 0 to 1.
theta |
numerical grid values for a parameter of interest in a specified range (between lower and upper bounds). |
profile.lik |
numerical values for a profile likelihood corresponding to theta in a specified range (between lower and upper bounds). |
profile.lik.norm |
numerical values for a normalized profile likelihood ranging from 0 to 1. |
Arguments weights and subset in the lme
function are not comparable.
Missing values should be removed.
Leena Choi <[email protected]>
profilelike.plot
, profilelike.summary
, profilelike.lm
, profilelike.glm
, profilelike.polr
, profilelike.gls
, lme
## Not run: xx <- profilelike.lme(formula = yield ~ endpoint, random = ~ 1 | id, correlation=corAR1(form = ~ 1 | id), data=Gasoline, subject="Sample", profile.theta="vapor", method="ML", lo.theta=1, hi.theta=5, length=500, round=2) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=4) ## End(Not run)
## Not run: xx <- profilelike.lme(formula = yield ~ endpoint, random = ~ 1 | id, correlation=corAR1(form = ~ 1 | id), data=Gasoline, subject="Sample", profile.theta="vapor", method="ML", lo.theta=1, hi.theta=5, length=500, round=2) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=4) ## End(Not run)
The function provides a plot for a normalized profile likelihood as well as the maximum profile likelihood estimate and the k
th likelihood support intervals (Royall, 1997).
profilelike.plot(theta = theta, profile.lik.norm = profile.lik.norm, round = 2)
profilelike.plot(theta = theta, profile.lik.norm = profile.lik.norm, round = 2)
theta |
numerical grid values for a parameter of interest in a specified range. |
profile.lik.norm |
numerical values for a normalized profile likelihood ranging from 0 to 1. |
round |
the number of decimal places for |
The function provides a plot for a normalized profile likelihood obtained from profilelike.lm
, profilelike.glm
, profilelike.polr
, profilelike.gls
and profilelike.lme
. The maximum profile likelihood estimate, the k
th likelihood support interval (k
=8, k
=20, and k
=32), and the likelihood support interval (k
=6.8) corresponding to a 95% confidence interval based on a normal approximation are also presented.
A normalized profile likelihood plot with the maximum profile likelihood estimate and the k
th likelihood support intervals.
Leena Choi <[email protected]>
Royall, Richard M. (1997). Statistical Evidence: A Likelihood Paradiam. Chapman & Hall/CRC.
Pawitan, Yudi (2001). In All Likelihood: Statistical Modelling and Inference Using Likelihood. Oxford University Press.
profilelike.summary
, profilelike.lm
, profilelike.glm
, profilelike.polr
, profilelike.gls
, profilelike.lme
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- c(rep(0,10), rep(1,10)) weight <- c(ctl, trt) dd <- data.frame(group=group, weight=weight) xx <- profilelike.lm(formula = weight ~ 1, data=dd, profile.theta="group", lo.theta=-2, hi.theta=1, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2) profilelike.summary(k=8, theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=3)
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- c(rep(0,10), rep(1,10)) weight <- c(ctl, trt) dd <- data.frame(group=group, weight=weight) xx <- profilelike.lm(formula = weight ~ 1, data=dd, profile.theta="group", lo.theta=-2, hi.theta=1, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2) profilelike.summary(k=8, theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=3)
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a proportional odds model.
profilelike.polr(formula, data, profile.theta, method = "logistic", lo.theta = NULL, hi.theta = NULL, length = 300, round = 2, subset = NULL, weights = NULL, offset = NULL, ...)
profilelike.polr(formula, data, profile.theta, method = "logistic", lo.theta = NULL, hi.theta = NULL, length = 300, round = 2, subset = NULL, weights = NULL, offset = NULL, ...)
formula |
see corresponding documentation in |
data |
a data frame. See corresponding documentation in |
profile.theta |
a parameter of interest, theta; must be a numeric variable. |
method |
see corresponding documentation in |
lo.theta |
lower bound for a parameter of interest to obtain values for a profile likelihood. |
hi.theta |
upper bound for a parameter of interest to obtain values for a profile likelihood. |
length |
length of numerical grid values for a parameter of interest to obtain values for a profile likelihood. |
round |
the number of decimal places for |
subset |
should not be provided. |
weights |
should not be provided. |
offset |
should not be provided. |
... |
further arguments passed to or from other methods. |
This function provides values for a profile likelihood and a normalized profile likelihood for a parameter of interest in a proportional odds model. Users must define a parameter of interest in a proportional odds model. This function can be used for proportional odds models comparable with the polr
function. However, arguments weights, subset, and offset should not be provided. A normalized profile likelihood is obtained by a profile likelihood being divided by the maximum value of the profile likelihood so that a normalized profile likelihood ranges from 0 to 1.
theta |
numerical grid values for a parameter of interest in a specified range (between lower and upper bounds). |
profile.lik |
numerical values for a profile likelihood corresponding to theta in a specified range (between lower and upper bounds). |
profile.lik.norm |
numerical values for a normalized profile likelihood ranging from 0 to 1. |
Arguments weights, subset, and offset in the polr
function are not comparable.
Missing values should be removed.
Leena Choi <[email protected]>
profilelike.plot
, profilelike.summary
, profilelike.lm
, profilelike.glm
, profilelike.gls
, profilelike.lme
, polr
data(datapolr) datapolr$y <- as.factor(datapolr$y) xx <- profilelike.polr(y ~ x1 + x2, data=datapolr, profile.theta="group", method="logistic", lo.theta=-2, hi.theta=2.5, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
data(datapolr) datapolr$y <- as.factor(datapolr$y) xx <- profilelike.polr(y ~ x1 + x2, data=datapolr, profile.theta="group", method="logistic", lo.theta=-2, hi.theta=2.5, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2)
The function provides the maximum profile likelihood estimate and likelihood support intervals (Royall, 1997).
profilelike.summary(k, theta = theta, profile.lik.norm = profile.lik.norm, round = 2)
profilelike.summary(k, theta = theta, profile.lik.norm = profile.lik.norm, round = 2)
k |
strength of evidence for the |
theta |
numerical grid values for a parameter of interest in a specified range. |
profile.lik.norm |
numerical values for a normalized profile likelihood ranging from 0 to 1. |
round |
the number of decimal places for |
The function provides the maximum profile likelihood estimate and likelihood support intervals for a profile likelihood obtained from profilelike.lm
, profilelike.glm
, profilelike.polr
, profilelike.gls
and profilelike.lme
. The k
th likelihood support interval and the likelihood support interval (k
=6.8) corresponding to a 95% confidence interval based on a normal approximation are provided.
k |
strength of evidence for the |
mle |
the maximum profile likelihood estimate. |
LI.k |
the |
LI.norm |
likelihood support interval ( |
Leena Choi <[email protected]>
Royall, Richard M. (1997). Statistical Evidence: A Likelihood Paradiam. Chapman & Hall/CRC.
Pawitan, Yudi (2001). In All Likelihood: Statistical Modelling and Inference Using Likelihood. Oxford University Press.
profilelike.plot
, profilelike.lm
, profilelike.glm
, profilelike.polr
, profilelike.gls
, profilelike.lme
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- c(rep(0,10), rep(1,10)) weight <- c(ctl, trt) dd <- data.frame(group=group, weight=weight) xx <- profilelike.lm(formula = weight ~ 1, data=dd, profile.theta="group", lo.theta=-2, hi.theta=1, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2) profilelike.summary(k=8, theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=3)
ctl <- c(4.17,5.58,5.18,6.11,4.50,4.61,5.17,4.53,5.33,5.14) trt <- c(4.81,4.17,4.41,3.59,5.87,3.83,6.03,4.89,4.32,4.69) group <- c(rep(0,10), rep(1,10)) weight <- c(ctl, trt) dd <- data.frame(group=group, weight=weight) xx <- profilelike.lm(formula = weight ~ 1, data=dd, profile.theta="group", lo.theta=-2, hi.theta=1, length=500) profilelike.plot(theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=2) profilelike.summary(k=8, theta=xx$theta, profile.lik.norm=xx$profile.lik.norm, round=3)