我試圖在河上運行,從線性迴歸的引導我到目前爲止的代碼是引導線性迴歸
hprice<-lm(dat[,1]~dat[,3]+dat[,4]+dat[,5]+dat[,6])
print (hprice)
pricefunc<-function(data,ind) lm(data[ind,1]~data[ind,3]+data[ind,4]+data[ind,5]+data[ind,6])
hpboot<-boot(dat,pricefunc, 1000)
這似乎並沒有工作。
我真的不明白統計的論點,我會說這是我出錯的地方。
感謝
到底是什麼「不工作「 意思?您沒有提供足夠的代碼供其他人運行(即沒有樣本數據)。看看[這個問題](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example)如何製作一個可重複的例子。 – MrFlick
你是對的,我沒有提供足夠的代碼。我最大的問題是我無法確定boot()中的'statistic'參數。 我得到了一個答案,使它的工作,現在我只需要解決如何。謝謝 – Jamzy