rp.likelihood(rpanel)
rp.likelihood()所属R语言包:rpanel
Interactive inspection of one- or two-parameter likelihood surfaces
互动式检查一个或两个参数的可能性表面
译者:生物统计家园网 机器人LoveR
描述----------Description----------
This function plots a likelihood surface for a model with one or two parameters. It also creates a panel which allows the maximum likelihood estimate, a confidence region and other objects of interest to be added to the plot. For one parameter models, the tkrplot package is required. For two-parameter models the rgl package is required.
此函数绘制的模型表面,用于与一个或两个参数的似然度。它还创建了一个面板,它允许的最大似然估计,置信区间和其他感兴趣的对象被添加到图。对于一个参数模型,tkrplot包是必需的。双参数模型rgl包是必需的。
用法----------Usage----------
rp.likelihood(loglik.fn, data, theta.low, theta.high, form = "log-likelihood",
hscale = NA, vscale = hscale)
参数----------Arguments----------
参数:loglik.fn
This should be either the name of a function, with arguments theta and data, or R code, in text form, which evaluates the log-likelihood function. The latter form allows simple R expressions such as sum(log(dexp(data, theta))) or sum(log(dgamma(data, theta[1], theta[2]))) to be used to define the log-likelihood.
这应该是一个函数名,与参数theta和data,或R代码,在文本的形式,对数似然函数求值。后一种形式可以简单的R表现形式,如sum(log(dexp(data, theta)))或sum(log(dgamma(data, theta[1], theta[2])))被用来定义对数似然。
参数:data
an object which contains the data. This will be referred to in likelihood contributions.
一个对象,其中包含的数据。这将是在likelihood contributions。
参数:theta.low
a vector of length one or two which defines the lower limit(s) of the parameter values for initial plotting.
的矢量的长度的一个或两个初期布局的参数值的下限值(s)的定义。
参数:theta.high
a vector of length one or two which defines the upper limit(s) of the parameter values for initial plotting.
的矢量的长度的一个或两个初期布局的参数值的上限值(s)的定义。
参数:form
a text variable which determines whether the likelihood or log-likelihood function is to be plotted. This applies only to one-parameter models. With two-parameter models, only the log-likelihood is plotted.
决定是否要绘制的可能性或数似然函数是一个文本变量。这仅适用于一个参数的模型。具有双参数模型,只有对数似然绘制。
参数:hscale, vscale
scaling parameters for the size of the plot when there is one covariate. The default values are 1 on Unix platforms and 1.4 on Windows platforms.
缩放参数的图的大小,当有一个协变量。在Unix平台上的默认值是1和1.4在Windows平台上。
Details
详细信息----------Details----------
The interactive controls allow a variety of aspects of the plots to be altered. This is intended to allow students and lecturers to explore likelihood surfaces in a manner which promotes an intuitive understanding of the concepts involved.
交互式控件,允许各种方面的图被改变。这是为了让学生和讲师探讨的可能性面的方式促进一个直观的了解所涉及的概念。
In the case of one parameter, the vertical axes of teh (log-)likelihood plot can be cliked and grabbed to alter the plotting region interactively. This can be useful, in particular, in identifying the maximum likelihood estimator graphicall.
一个参数的情况下,垂直轴德(log)的可能性图可以cliked,抓住交互方式改变绘图区域。这可能是有用的,特别是,在确定的最大似然估计graphicall。
值----------Value----------
Nothing is returned.
不返回任何值。
参考文献----------References----------
rpanel: Statistical cartoons in <code>R</code>. (http://www.mathstore.ac.uk/headocs/doc.php?doc=7403_bowman_a_statsr.pdf)
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
实例----------Examples----------
if (interactive()) {
data(aircond)
rp.likelihood("sum(log(dexp(data, theta)))", aircond, 0.005, 0.03)
rp.likelihood("sum(log(dgamma(data, theta[1], theta[2])))",
aircond, c(0.3, 0.005), c(3, 0.06))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|