lik.ci(SMPracticals)
lik.ci()所属R语言包:SMPracticals
Likelihood Confidence Intervals for Scalar Parameter
标量参数的似然置信区间
译者:生物统计家园网 机器人LoveR
描述----------Description----------
A simple function for computing confidence intervals from the values of a likelihood function for a scalar parameter. It prints the maximum likelihood estimate (MLE) and its standard error, and confidence intervals based on normal approximation to the distribution of the MLE and on the chi-squared approximation to the distribution of the likelihood ratio statistic.
一个简单的函数,从为一个标量参数的似然函数的值的计算置信区间。它可以打印的最大似然估计(MLE)及其标准误和置信区间的基础上正常近似的MLE的分布,卡方近似的似然比统计量的分布。
用法----------Usage----------
lik.ci(psi, logL, conf = c(0.975, 0.025))
参数----------Arguments----------
参数:psi
Vector containing parameter values, the range of which contains the MLE
Vector,其中包含的参数值,范围包含MLE
参数:logL
Vector containing corresponding log likelihood values
Vector,其中包含相应的对数似然值
参数:conf
Vector containing levels for which confidence interval limits needed
Vector,其中包含的置信区间的界限,
值----------Value----------
See above
见上文
注意----------Note----------
This uses the spline functions in library(modreg).
这样条函数库(modreg)。
(作者)----------Author(s)----------
Anthony Davison (Anthony.Davison@epfl.ch)
参考文献----------References----------
实例----------Examples----------
# likelihood analysis for mean of truncated Poisson data[平均截断的Poisson数据的可能性分析]
y <- c(1:6)
n <- c(1486,694,195,37,10,1)
logL <- function(x, y, n.obs) # x is theta[x是THETA]
{ f <- dpois(y,x)/(1-dpois(0,x)) # dpois is Poisson PDF[dpois是泊松PDF]
sum(n*log(f)) } # log likelihood[对数似然]
theta <- seq(from=0.8, to=1, length=200)
L <- rep(NA, 200)
for (i in 1:200) L[i] <- logL(theta[i], y, n)
plot(theta, L, type="l", ylab="Log likelihood")
lik.ci(theta, L)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|