plot.ci(Zelig)
plot.ci()所属R语言包:Zelig
Plotting Vertical confidence Intervals
绘制垂直置信区间
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The plot.ci command generates vertical confidence intervals for linear or generalized linear univariate
plot.ci命令生成垂直的置信区间为线性或广义线性单变量
用法----------Usage----------
## S3 method for class 'ci'
plot(x, CI = 95, qi = "ev", main = "", ylab = NULL, xlab = NULL,
xlim = NULL, ylim = NULL, col = c("red", "blue"), ...)
参数----------Arguments----------
参数:x
stored output from sim. The x$x and optional x$x1 values used to generate the sim output object must have more than one observation.
存储输出从sim。 x$x和可选的x$x1用于生成sim输出对象的值必须有一个以上的观察。
参数:CI
the selected confidence interval. Defaults to 95 percent.
选定的置信区间。默认为95%。
参数:qi
the selected quantity of interest. Defaults to expected values.
所选择的数量利益。默认为预期值。
参数:main
a title for the plot.
一个标题为图。
参数:ylab
label for the y-axis.
标签的y轴。
参数:xlab
label for the x-axis.
标签的x轴。
参数:xlim
limits on the x-axis.
在x-轴的限制。
参数:ylim
limits on the y-axis.
限制在y-轴。
参数:col
a vector of at most two colors for plotting the expected value given by x and the alternative set of expected values given by x1 in sim. If the quantity of interest selected is not the expected value, or x1 = NULL, only the first color will be used.
一个向量最多两种颜色的x绘制的预期值和预期值的另一套x1sim。如果感兴趣的选择的数量是不是预期的值,或x1 = NULL,只有第一颜色可以使用的。
参数:...
Additional parameters passed to plot.
额外的参数传递给plot。
值----------Value----------
For all univariate response models, plot.ci() returns vertical confidence intervals over a specified range of one explanatory variable. You may save this plot using the commands described in the Zelig manual (http://gking.harvard.edu/zelig).
对于所有的单变量响应模型,plot.ci()返回垂直置信区间的一个解释变量在一定范围内。策利希手册(http://gking.harvard.edu/zelig)的描述中使用的命令,您可以保存该图。
(作者)----------Author(s)----------
Kosuke Imai <<a href="mailto:kimai@princeton.edu">kimai@princeton.edu</a>>; Gary King
<<a href="mailto:king@harvard.edu">king@harvard.edu</a>>; Olivia Lau <<a href="mailtolau@fas.harvard.edu">olau@fas.harvard.edu</a>>
参见----------See Also----------
The full Zelig manual is available at http://gking.harvard.edu/zelig, and users may also wish to see plot, lines.
全策利希的手动是可在http://gking.harvard.edu/zelig,和用户还可以看到plot,lines。
实例----------Examples----------
data(turnout)
z.out <- zelig(vote ~ race + educate + age + I(age^2) + income,
model = "logit", data = turnout)
age.range <- 18:95
x.low <- setx(z.out, educate = 12, age = age.range)
x.high <- setx(z.out, educate = 16, age = age.range)
s.out <- sim(z.out, x = x.low, x1 = x.high)
plot.ci(s.out, xlab = "Age in Years",
ylab = "redicted Probability of Voting",
main = "Effect of Education and Age on Voting Behavior")
legend(45, 0.52, legend = c("College Education (16 years)",
"High School Education (12 years)"), col = c("blue","red"),
lty = c("solid"))
## adding lines connecting point estimates[#增加连接线的点估计]
lines(age.range, apply(s.out$qi$ev, 2, mean))
lines(age.range, apply(s.out$qi$fd+s.out$qi$ev, 2, mean))
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|