linear.approx
位於 boot
包(package)。 說明
此函數采用引導程序對象,並且對於每個引導程序複製,它計算該引導程序樣本的感興趣統計量的線性近似值。
用法
linear.approx(boot.out, L = NULL, index = 1, type = NULL,
t0 = NULL, t = NULL, ...)
參數
boot.out |
代表非參數引導程序的 |
L |
包含感興趣統計的經驗影響值的向量。如果未提供,則通過調用 |
index |
|
type |
這給出了要計算的經驗影響值的類型。如果提供 |
t0 |
感興趣的統計量的觀測值。僅當還提供了 |
t |
感興趣的統計數據的引導複製向量。如果 |
... |
|
細節
在一個樣本中,t0 + sum(L * f)/n
給出了頻率向量 f
的引導複製的線性近似,並且可以輕鬆擴展到分層情況。通過調用 boot.array
可以找到頻率。
值
長度為 boot.out$R
的向量,具有每個引導樣本的感興趣統計量的線性近似值。
例子
# Using the city data let us look at the linear approximation to the
# ratio statistic and its logarithm. We compare these with the
# corresponding plots for the bigcity data
ratio <- function(d, w) sum(d$x * w)/sum(d$u * w)
city.boot <- boot(city, ratio, R = 499, stype = "w")
bigcity.boot <- boot(bigcity, ratio, R = 499, stype = "w")
op <- par(pty = "s", mfrow = c(2, 2))
# The first plot is for the city data ratio statistic.
city.lin1 <- linear.approx(city.boot)
lim <- range(c(city.boot$t,city.lin1))
plot(city.boot$t, city.lin1, xlim = lim, ylim = lim,
main = "Ratio; n=10", xlab = "t*", ylab = "tL*")
abline(0, 1)
# Now for the log of the ratio statistic for the city data.
city.lin2 <- linear.approx(city.boot,t0 = log(city.boot$t0),
t = log(city.boot$t))
lim <- range(c(log(city.boot$t),city.lin2))
plot(log(city.boot$t), city.lin2, xlim = lim, ylim = lim,
main = "Log(Ratio); n=10", xlab = "t*", ylab = "tL*")
abline(0, 1)
# The ratio statistic for the bigcity data.
bigcity.lin1 <- linear.approx(bigcity.boot)
lim <- range(c(bigcity.boot$t,bigcity.lin1))
plot(bigcity.lin1, bigcity.boot$t, xlim = lim, ylim = lim,
main = "Ratio; n=49", xlab = "t*", ylab = "tL*")
abline(0, 1)
# Finally the log of the ratio statistic for the bigcity data.
bigcity.lin2 <- linear.approx(bigcity.boot,t0 = log(bigcity.boot$t0),
t = log(bigcity.boot$t))
lim <- range(c(log(bigcity.boot$t),bigcity.lin2))
plot(bigcity.lin2, log(bigcity.boot$t), xlim = lim, ylim = lim,
main = "Log(Ratio); n=49", xlab = "t*", ylab = "tL*")
abline(0, 1)
par(op)
參考
Davison, A.C. and Hinkley, D.V. (1997) Bootstrap Methods and Their Application. Cambridge University Press.
也可以看看
相關用法
- R lines.saddle.distn 將鞍點近似添加到繪圖中
- R logit 比例的邏輯
- R poisons 動物生存時間
- R ducks 雜交鴨的行為和羽毛特征
- R nodal 前列腺癌的淋巴結受累
- R cloth 布料瑕疵數量
- R polar 新喀裏多尼亞紅土的極點位置
- R capability 模擬製造過程數據
- R beaver 海狸體溫數據
- R saddle.distn Bootstrap 統計的鞍點分布近似
- R tsboot 時間序列的引導
- R EEF.profile 經驗可能性
- R tau Tau 粒子衰變模式
- R gravity 重力加速度
- R boot 引導重采樣
- R plot.boot Bootstrap 模擬的輸出圖
- R boot.ci 非參數引導置信區間
- R tilt.boot 非參數傾斜引導
- R envelope 曲線的置信區間
- R bigcity 美國城市人口
- R co.transfer 一氧化碳轉移
- R imp.weights 重要性采樣權重
- R acme 每月超額返回
- R glm.diag.plots 廣義線性模型的診斷圖
- R survival 輻射劑量後大鼠的存活率
注:本文由純淨天空篩選整理自R-devel大神的英文原創作品 Linear Approximation of Bootstrap Replicates。非經特殊聲明,原始代碼版權歸原作者所有,本譯文未經允許或授權,請勿轉載或複製。