samples(simpleboot)
samples()所属R语言包:simpleboot
Extract sampling distributions from bootstrapped linear/loess models.
提取自举线性/黄土模型的抽样分布。
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Extract sampling distributions of various entities from either a linear model or a loess bootstrap. Entities for linear models are currently, model coefficients, residual sum of squares, R-square, and fitted values (given a set of X values in the original bootstrap). For loess, one can extract residual sum of squares and fitted values.
提取样本分布的各种实体,无论是从线性模型或黄土引导的。目前,线性模型的实体模型系数,残差平方和,R-平方,拟合值(给定一组的X值在原来的引导)。湿陷性黄土,可以提取残差平方和拟合值。
用法----------Usage----------
samples(object, name = c("fitted", "coef", "rsquare", "rss"))
参数----------Arguments----------
参数:object
The output from either lm.boot or loess.boot.
输出距离是lm.boot或loess.boot。
参数:name
The name of the entity to extract. The default is fitted values.
提取的实体的名称。默认值是拟合值。
值----------Value----------
Either a vector or matrix depending on the entity extracted. For example, when extracting the sampling distributions for linear model coefficents, the return value is p x R matrix where p is the number of coefficients and R is the number of bootstrap replicates.
向量或矩阵取决于实体提取。例如,当提取的采样分布的线性模型复振荡,返回值是px R矩阵,其中p是系数的数目,和R是自举复制的数目。
(作者)----------Author(s)----------
Roger D. Peng
实例----------Examples----------
data(airquality)
attach(airquality)
lmodel <- lm(Ozone ~ Solar.R + Wind)
lboot <- lm.boot(lmodel, R = 500)
## Get sampling distributions for coefficients[#得到的系数的抽样分布]
s <- samples(lboot, "coef")
## Histogram for the intercept[#直方图用于拦截]
hist(s[1,])
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|