rp.regression(rpanel)
rp.regression()所属R语言包:rpanel
Interactive display of regression with one or two covariates
交互式显示与一个或两个协变量的回归
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The function rp.regression plots a response variable against one or two covariates and creates a panel which controls the model which is fitted to the data and displayed on the plot. In the case of two covariates, a three-dimensional display is created. The function rp.regression2 is retained simply for compatibility with earlier releases of the package.
该函数rp.regression绘制针对一个或两个协变量和创建一个面板,其控制嵌合的数据和显示的图上的模型的响应变量。以两个协变量的情况下,创建的三维显示。函数rp.regression2简单地被保留的兼容性与早期版本的软件包。
用法----------Usage----------
rp.regression(x, y, ylab = NA, x1lab = NA, x2lab = NA, xlab = NA,
panel = TRUE, panel.plot = TRUE, hscale = NA, vscale = hscale,
model = "None", line.showing = TRUE, residuals.showing = FALSE, size = 3, col = "red")
rp.regression2(y, x1, x2, ylab = NA, x1lab = NA, x2lab = NA,
panel = TRUE, model = "None", residuals.showing = FALSE, size = 3, col = "red")
参数----------Arguments----------
参数:x
a vector or two column matrix of covariate values.
一个向量或两列矩阵的协变量值。
参数:y
a vector of response values.
的响应值的矢量。
参数:x1, x2
vectors of covariate values.
向量的协变量值。
参数:ylab
a character variable used for the response axis label.
一个字符变量的响应轴标签。
参数:x1lab
a character variable used for the first covariate axis label.
一个字符变量的协轴标签。
参数:x2lab
a character variable used for the second covariate axis label.
使用一个字符变量的第二的协轴标签。
参数:xlab
a character variable used for the first covariate axis label. This is provided for convenience as a more natural argument name when there is only one covariate.
一个字符变量的协轴标签。这是为方便起见,提供一个更自然的参数名称时,只有一个协变量。
参数:panel
a logical variable which determines whether a panel is created to allow interactive control of the fitted models. This is relevant only to the case of two covariates.
一个逻辑变量,它确定是否创建一个面板,以允许交互式控制的拟合模型。这是只有两个协变量的情况有关。
参数:panel.plot
a logical variable which determines whether the plot is placed inside the control panel. This is relevant only to the case of one covariate.
一个逻辑变量,确定是否的图被放置在控制面板。这是只有一个协变量的情况有关。
参数:hscale, vscale
scaling parameters for the size of the plot when there is one covariate and panel.plot is set to TRUE. The default values are 1 on Unix platforms and 1.4 on Windows platforms.
缩放参数的图形大小时,有一个协变量和panel.plot设置为TRUE。在Unix平台上的默认值是1和1.4在Windows平台上。
参数:model
a character variable defining the model to be fitted when the function starts. The valid values are "None", the name of the first and second covariates and the combination of these names with an "&". This is relevant only to the case of two covariates.
一个字符变量定义模型功能启动时,安装。有效的值是“无”,一个“&”的第一和第二协变量的名称,这些名称的组合。这是只有两个协变量的情况有关。
参数:line.showing
a logical value determining whether a regression line is shown on the plot when the function starts. This is relevant only to the case of one covariates.
一个逻辑值,该值确定是否示出回归直线的图上的功能启动时。这是很重要的一个协变量的情况下。
参数:residuals.showing
a logical value determining whether the residuals are shown on the plot when the function starts.
一逻辑值,决定是否残差如图中所示,当函数开始。
参数:size
the size of the plotted points. This is relevant only to the case of two covariates.
绘制的点的大小。这是只有两个协变量的情况有关。
参数:col
the colour of the plotted points. This is relevant only to the case of two covariates.
绘制的点的颜色。这是只有两个协变量的情况有关。
Details
详细信息----------Details----------
In the case of one covariate, the control panel allows a line to be drawn on the plot and its intercept and slope altered interactively. The residuals and the least squares fitted line can be displayed. When the fitted line is displayed, the effects of moving individual points can be viewed by clicking and dragging.
在一个协变量的情况下,在控制面板允许一列,要绘制在图上,并以交互方式的截距和斜率改变。可以显示的残差和最小二乘拟合线。当拟合线显示,移动单个点的影响,可以通过点击和拖动查看。
In the case of two covariates, the plot is constructed with the aid of the rgl package for three-dimensional display, through the rpanel function rp.plot3d. This display can be rotated and linear models involving one, two or none of the covariates can be displayed. Residuals can also be superimposed.
在两个协变量的情况下,该图的构建与三维显示RGL包的帮助下,通过rpanel函数rp.plot3d。此显示器可以旋转和线性模型涉及一个,两个或两个没有协变量可以被显示。残差也可以被叠加。
In the case of two covariates, static plots, for printing or other purposes can be created by setting the panel argument to FALSE and specifying model and residuals.showing as required.
印刷或其他用途的情况下,两个协变量,静态图,可以创建面板参数设置为FALSE,并且指定model和residuals.showing的要求。
值----------Value----------
Nothing is returned.
不返回任何值。
参考文献----------References----------
rpanel: Simple interactive controls for R functions using the tcltk package. Journal of Statistical Software, 17, issue 9.
参见----------See Also----------
rp.plot3d
rp.plot3d
实例----------Examples----------
if (interactive()) {
data(CofE)
attach(CofE)
rp.regression(Employ, Giving)
rp.regression(cbind(Employ, Attend), Giving)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|